Apache searches for old DocumentRoot after editing the config file and restarting it
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 A开发者_JAVA技巧pache 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
.
Have you checked these settings?
/etc/httpd/conf/extra/httpd-ssl.conf
/etc/httpd/conf/extra/httpd-userdir.conf
/etc/httpd/conf/extra/httpd-vhosts.conf
Issue this command:
user@arch~>> grep "srv/http" /etc/httpd -R | grep -v vhost | grep -v log
This command will tell you what is looking for /srv/http/ directory
if you have vhosts enabled, use this one instead:
user@arch~>> grep "srv/http" /etc/httpd -R | grep -v log
精彩评论