Apache 在编辑配置文件并重新启动后搜索旧的 DocumentRoot
我正在使用 Arch Linux 3.0-ARCH。我已将 /etc/httpd/conf/httpd.conf
中的 DocumentRoot
从 /srv/http
更改为 /var/ www
。然后我发出这个命令:
% sudo /etc/rc.d/httpd restart
:: Restarting Apache Web Server [BUSY]
Warning: DocumentRoot [/srv/http] does not exist
尽管如果我将文件复制到 /var/www
,它们可以在本地主机上看到。 我已经设置了正确的权限 - /var/www
由 root 拥有,其组是 www
。我和 Apache 运行的 http
用户都是该组的成员。该目录的权限为 775
。
I'm using Arch Linux 3.0-ARCH. I've changed my DocumentRoot
in /etc/httpd/conf/httpd.conf
from /srv/http
to /var/www
. Then I issued this command:
% sudo /etc/rc.d/httpd restart
:: Restarting Apache Web Server [BUSY]
Warning: DocumentRoot [/srv/http] does not exist
Although if I copy files to /var/www
, they can be seen on localhost.
I've set the correct permissions—/var/www
is owned by root, its group is www
. Both I and the http
user that Apache runs as are a member of that group. Permissions on the directory are 775
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您检查过这些设置吗?
Have you checked these settings?
发出此命令:
如果您启用了虚拟主机,此命令将告诉您正在寻找 /srv/http/ 目录的内容
,请改用此命令:
Issue this command:
This command will tell you what is looking for /srv/http/ directory
if you have vhosts enabled, use this one instead: