Here we list some minor things that improve your Apache setup:
# Setting the default ServerName
If you get a warning like this:
Could not reliably determine the server's fully qualified domain name
then you may wish to configure it. With multiple VHosts which one do you choose? Howabout localhost?
To prevent this message from appearing, clarify that you want to serve from localhost (127.0.0.1) by adding the following line into your /etc/apache2/apache2.conf file:
This no longer seems to work for me on Ubuntu14.04. - stackoverflow
But this does - stackoverflow ![]()
sudo nano /etc/apache2/apache2.conf
Add the line:
ServerName localhost
Save and quit. You may want to test:
apachectl configtest
Then finally if everything is OK, Restart Apache:
# Document Root
This directive sets the directory from which Apache will serve files. Unless matched by a directive like Alias, the server appends the path from the requested URL to the document root to make the path to the document. Example:
DocumentRoot /home/www/theos.in
then an access to http://www.theos.in/index.html refers to /home/www/theos.in/index.html.
To find the Apache Document Root use grep command as follows:
# grep -i 'DocumentRoot' httpd.conf