我正在尝试在 Mac OS X 上设置虚拟主机。我一直在修改 httpd.conf 并重新启动服务器,但没有让它正常工作。此外,我注意到它不在 httpd.conf (Libraries/WebServer/Documents) 中提到的 DocumentRoot 中提供文件,而是在不同的目录 (/usr/local/apache2/htdocs) 中提供文件。我在 httpd.conf 中的任何地方都没有看到这个文件夹。此外,PHP 可以工作,但“LoadModule php5_module”行被注释掉了。这让我觉得它在使用另一个 .conf 文件。如何确定实际加载了哪个配置?
更新:我刚刚删除了 httpd.conf 和 apache 在重启后的行为相同,所以它肯定没有使用它!
在我的 Mac OS X 上,网络共享在系统偏好设置 -> 共享 -> 服务 ->“个人网络共享”中被禁用。尽管如此,当我在浏览器中输入“localhost”时,我得到“It works!” 消息,意味着 Apache 仍在运行。如何禁用它?
目前捆绑的 Apache 端口 80 与我的 MAMP 安装冲突,因为我希望 MAMP 在 80 上运行。
在尝试使用 SSH 克隆远程 Git 存储库时,我收到以下错误:
git clone user@remote-repo:project.git .
remote: Counting objects: 187444, done.
remote: Compressing objects: 100% (73430/73430), done.
client_loop: send disconnect: Broken pipe.06 MiB | 4.04 MiB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: index-pack failed
Run Code Online (Sandbox Code Playgroud)
我的环境具有以下规格:
git --version git version 2.30.1
git 包可以在这里找到https://pkgs.alpinelinux.org/package/edge/main/x86_64/git
uname -a
Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 Linux
2021-03-09-07:11AM wsl@Alpine:~$ more /etc/issue
Welcome to Alpine Linux 3.10
Kernel \r …
Run Code Online (Sandbox Code Playgroud) 我正在尝试更新/etc/apt/sources.list
我的 VPS。当我运行时,apt-get update
我找不到各种 404,例如:
Failed to fetch http://debian.newdream.net/dists/etch/main/binary-amd64/Packages.gz 404 Not Found
Failed to fetch http://security.debian.org/dists/etch/updates/main/binary-amd64/Packages.gz 404 Not Found [IP: 149.20.20.6 80]
Failed to fetch http://www.ksplice.com/apt/dists/etch/ksplice/binary-amd64/Packages.gz 404 Not Found
Run Code Online (Sandbox Code Playgroud)
当我查看http://www.debian.org/releases/etch/ 时,我没有看到任何关于档案的信息。我在archive.debian.org 中,但我对如何遵循它的说明/修改源列表感到有些困惑。以下是当前列表的内容:
deb http://debian.di.newdream.net/ etch ndn
deb http://www.ksplice.com/apt etch ksplice
deb http://debian.newdream.net etch main non-free contrib
deb http://www.backports.org/debian/ etch-backports main
deb http://archive.debian.org/debian-volatile etch/volatile main contrib non-free
deb http://security.debian.org/ etch/updates main
deb http://debian.dc-uoit.net/debian-multimedia/ etch main
Run Code Online (Sandbox Code Playgroud)
从我在存档 README 上阅读的内容来看,我认为格式应该是这样的:
deb http://archive.debian.org/debian-security dists/etch/updates/ main
Run Code Online (Sandbox Code Playgroud)
此外,在注释掉源文件中的大部分(如果不是所有行)之后,我仍然遇到相同的错误。是否有需要运行的命令来清除缓存?
apache-2.2 ×2
mac-osx ×2
apt ×1
debian ×1
debian-etch ×1
git ×1
httpd.conf ×1
linux ×1
ssh ×1
virtualhost ×1