Comment 3 for bug 370542

Revision history for this message
Martin Zuther (mzuther) wrote : Re: Accessing http://localhost gives without reason a 403 Forbidden error page

Hi!

It seems that I'm also affected by this bug. Here's how to reproduce this problem:

1. do a fresh install of apache2 in Ubuntu Jaunty
2. change line 13 in /etc/apache2/sites-available/default from "allow from all" to "allow from localhost"
3. reboot (this is important!)
4. open http://localhost/ in the browser of your choice. You'll get the error message "Forbidden. You don't have permission to access / on this server", whereas the address http://127.0.0.1/ will greet you with the correct "It works!"

"sudo /etc/init.d/apache2 restart" will solve the problem until the next boot, and changing line 13 back to "allow from all" will work as it should.

Maybe apache is started before the network is correctly initialised and therefore doesn't know "localhost"?

Martin