3

I use Ubuntu 13.10 for my home system. Today I upgraded apache from version 2.4.6 to version 2.4.7 and it stopped working. By this I mean the following:

Apache is running (I checked with pgrep apache and it has the following version 2.4.7-1+sury.org~saucy+1). When I try to access http://localhost/ I get

The requested URL / was not found on this server.

Apache/2.4.7 (Ubuntu) Server at localhost Port 80

The same thing when I try http://localhost/index.html

The requested URL /index.html was not found on this server.

I cleaned my /var/www folder (removed everything and the only thing that is left is index.html which has just one world inside). I also checked that apache has permissions to read the file (in fact I put 777 for all www directory and everything inside just to be sure).

I truncated error.log and access.log and tried to access localhost once again. Error.log has not changed and the only line :

127.0.0.1 - - [TIMESTAMP] "GET /index.html HTTP/1.1" 404 498 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.107 Safari/537.36"

appeared in access.log.

I am out of ideas what else can I try. Any idea how can I fix this? Another relevant thing is that when I was upgrading apache, it asked me if I want to change my conf file with the new one and I decided to stick with mine (I regret this right now).

2
  • 2
    Please show the relevant parts of your virtual host configuration. Feb 15, 2014 at 13:18
  • @MichaelHampton thank you for looking into the problem. Booteille's answer solved it. Feb 15, 2014 at 20:21

1 Answer 1

11

I had the same issue and I just changed the following line in the /etc/apache2/sites-available/000-default.conf file :

DocumentRoot /var/www/html

by

DocumentRoot /var/www
3
  • If it worked with that path prior to the upgrade there's no reason it should require changing after the upgrade - So is Ubuntu changing their configuration file, or is something else going on here?
    – voretaq7
    Feb 17, 2014 at 2:36
  • 2
    I think the Ubuntu update has changed the config file here to /var/www/html. I had this same problem after an update. Thanks.
    – anjanesh
    Feb 23, 2014 at 5:45
  • I am 100% positive that @anjanesh is correct. Why do they have to mess with things? Just to give IT job security, I guess...
    – Sablefoste
    Jan 12, 2015 at 19:56

Not the answer you're looking for? Browse other questions tagged .