This days I sleep with my http://localhost
working, and reading pages from /var/www
...
I woke up with an "AH00094" error at Apache2
See here:
Why has the apache2 www dir been moved to /var/www/html?
The default directory apparently (we were also surprised) moved from /var/www
to /var/www/html
for htdocs in Debian, and Ubuntu copied this change. The reasons given are somewhat sound, but the upgrade path is probably “interesting” (as in the Chinese proverb)… as you have encountered.
If you want to use /www
as root folder instead of /www/html
you can simply edit the apache2 config file to have /var/www
Edit 000-default.conf
sudo gedit /etc/apache2/sites-available/000-default.conf
then change
DocumentRoot /var/www/html
to
DocumentRoot /var/www
Restart apache2 server :
sudo service apache2 restart