Ubuntu – Root Directory /var/www/html : Apach2 on Ubuntu 14.04

Ubuntuubuntu-14.04

I just set up the apache2/mysql server to play around with. But I found the something different than what I saw before. The root directory is pointed to /var/www/html/. I checked the /etc/apache2/apache2.conf file ,and says

<Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

This says the root directory points to /var/www/. Is this a bug ? And I also want to know why they made /var/www/html instead of /var/www/.

Best Answer

Usually the default configuration (eg. /var/www/html) is defined in /etc/apache2/sites-enabled and is overriding what's in your apache2.conf. This is normal behaviour, and it's common practice to add your vhost config as separate files in /etc/apache2/sites-available then symlink the enabled ones to /etc/apache2/sites-enabled.

If you want to edit the default config edit /etc/apache2/sites-available/000-default.conf.