These days, I sleep with http://localhost and read pages from /var/www ...
I woke up with the error "AH00094" in the Apache2 log and (created by Apache2?) Surprised /var/www/html , which is trying to use Apache2.
Now my http://localhost/anything not working (404 error in the browser).
How to fix it? I need to return my http://localhost working with files in /var/www !
Context
I use Ubuntu12 with Apache2, all standard and standard.
I checked the tail /var/log/apache2/error.log error log to find out the exact path that Apache is showing
... [core:notice] [pid 1597] AH00094: Command line: '/usr/sbin/apache2' ... [:error] [pid 1604] [client 127.0.0.1:40624] script '/var/www/html/info.php' not found or unable to stat
The /var/www/html folder is new, everything, for example, '/var/www/info.php', is located in /var/www , and not in /var/www/html .
I fixed the error "AH00094" for editing
sudo nano /etc/apache2/apache2.conf
and adding the last line
ServerName localhost
(now there are no localhost log errors, but nothing works)
PS: I checked other related problems, but not the same problem: Permissions for / var / www / html , Attempting to use a symlink for var / www / html
I am afraid to use the hints of this answer ... in my Ubuntu there are no specified .conf files. Should I create it? Is safe
As @RahilWazir explained, here is my "/etc/apache2/sites-available/000-default.conf",
<VirtualHost *:80>