Hi,
Before 14.04 the root directory for apache web server was /var/www
From 14.04 this changed to /var/www/html - I believe the change was made for security reasons.
So you should now place your files in /var/www/html - for example for your local website.
To confirm this I can see that the configuration file on my system (/etc/apache2/sites-available/000-default.conf) has the following entry to set the root directory:
DocumentRoot /var/www/html
I use a standard script to display information on my PHP installation which according to online guides should now be placed in /var/www/html but when I run the script with http://localhost/info.php it doesn't work. Instead I have to use http://localhost/html/info.php.
So it seems there is a legacy setting on my system which is overriding the apache configuration file mentioned above.
Does anyone know what or where this file is located so I can update it so that my system is configured correctly? And just in case anyone asks, I have tried re-starting the apache server.
Thanks in advance,
Nick
Before 14.04 the root directory for apache web server was /var/www
From 14.04 this changed to /var/www/html - I believe the change was made for security reasons.
So you should now place your files in /var/www/html - for example for your local website.
To confirm this I can see that the configuration file on my system (/etc/apache2/sites-available/000-default.conf) has the following entry to set the root directory:
DocumentRoot /var/www/html
I use a standard script to display information on my PHP installation which according to online guides should now be placed in /var/www/html but when I run the script with http://localhost/info.php it doesn't work. Instead I have to use http://localhost/html/info.php.
So it seems there is a legacy setting on my system which is overriding the apache configuration file mentioned above.
Does anyone know what or where this file is located so I can update it so that my system is configured correctly? And just in case anyone asks, I have tried re-starting the apache server.
Thanks in advance,
Nick
Comment