Ubuntu 14.04 LAMP Root Directory Incorrect

November 25, 2014 2k views

Hi, while attempting to allow for mod rewrites I created another issue - the root directory for my virtual host is now pointing to the incorrect path, although nothing much was altered on the server.

Running apache2ctl -S

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message
VirtualHost configuration:
*:80          (/etc/apache2/sites-enabled/000-default.conf:1)
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex mpm-accept: using_defaults
Mutex watchdog-callback: using_defaults
Mutex rewrite-map: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl 
PidFile: "/var/run/apache2/apache2.pid"
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used

Yet 000-default.conf yields

ServerAdmin admin@domain.net
DocumentRoot /var/www/sitename.com/public_html

I cannot find anywhere that has the directory labeled as var/www rather than /var/www/sitename.com/public_html

What would be overriding my settings?

1 Answer

apache2ctl -S will return the main document root that may be specified in /etc/apache2/apache2.conf. It will not reflect the DocumentRoot for individual virtualhosts.

Have another answer? Share your knowledge.