Ubuntu 14.04 LAMP Root Directory Incorrect

Posted November 25, 2014 2.7k 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/"
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used

Yet 000-default.conf yields

DocumentRoot /var/www/

I cannot find anywhere that has the directory labeled as var/www rather than /var/www/

What would be overriding my settings?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
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.