[Bug 370542] Re: Accessing http://localhost gives without reason a 403 Forbidden error page

2009-05-01 Thread papukaija
Here is the output from apache's error log:

[Fri May 01 22:09:58 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 
with Suhosin-Patch configured -- resuming normal operations
[Fri May 01 22:26:57 2009] [error] [client ::1] client denied by server 
configuration: /var/www/
[Fri May 01 22:33:19 2009] [error] [client ::1] client denied by server 
configuration: /var/www/aaa
[Fri May 01 22:35:20 2009] [notice] caught SIGTERM, shutting down
[Fri May 01 22:35:21 2009] [notice] Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.1 
with Suhosin-Patch configured -- resuming normal operations
[Fri May 01 22:35:25 2009] [error] [client 127.0.0.1] File does not exist: 
/var/www/aaa

I'm also attaching /etc/apache2/sites-avaible/default file. I haven't
modified the apache2.conf file.

** Attachment added: default
   http://launchpadlibrarian.net/26228255/default

-- 
Accessing http://localhost gives without reason a 403 Forbidden error page
https://bugs.launchpad.net/bugs/370542
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 370542] Re: Accessing http://localhost gives without reason a 403 Forbidden error page

2009-05-01 Thread Martin Zuther
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

-- 
Accessing http://localhost gives without reason a 403 Forbidden error page
https://bugs.launchpad.net/bugs/370542
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 370542] Re: Accessing http://localhost gives without reason a 403 Forbidden error page

2009-05-01 Thread Jonathan Marsden
DIAGNOSIS:

Based on the [client ::1] in the log entries, I strongly suspect an IPv6
related issue here.

In Jaunty, /etc/hosts has a line

::1 localhost ip6-localhost ip6-loopback

where in Intrepid, this was

::1 ip6-localhost ip6-loopback

I *strongly* suspect that allow from localhost in Apache maps to an
IPv4 allow from 127.0.0.1, but in Jaunty, the incoming request is
actually coming in from IPv6 address ::1, which therefore does not match
the allow rule.

EVIDENCE:

(A) Once you edit things to use allow localhost and then reboot,
browsing to http://[::1]/. fails but browsing to http://[127.0.0.1]/
works.

(B) Editing the line of .etrc/hosts that starts with ::1 to remove the
localhost name and then restarting your browser allows browsing to
http://localhost/ to work once more (because now localhost resolves to
127.0.0.1).

SOLUTION:

The 'fix' is now trivially obvious.  Edit the line of /etc/apache2
/sites-available/default to say allow localhost as before, and then
add a new line immediately after it that says allow ::1 . Now both
IPv4 locahost and IPv6 localhost clients are permitted the rules the
sysadmin has manually specified, and now browsing from Firefox on the
local machine works as expected.

QUESTION:  Is this really a bug?  Or is it simply a change of overall
system behaviour as the world becomes more IPv6 conscious, that those
who like editing Apache config files by hand should know about?  [I
suspect the latter, but I'm not at all dogmatic about that opinion :)  ]

In case it matters, my tests were all done in a Jaunty i386 virtual
machine using virtualbox-ose on a Jaunty amd86 host system, and with
Firefox as my browser of choice.

Jonathan

-- 
Accessing http://localhost gives without reason a 403 Forbidden error page
https://bugs.launchpad.net/bugs/370542
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 370542] Re: Accessing http://localhost gives without reason a 403 Forbidden error page

2009-05-01 Thread Andreas Olsson
Let me see if I understand this correctly..

You installed Apache2, and when you directly afterwards try to visit
http://localhost you are greeted by the 403? Later restarting apache2
solves the problem?

I did a fresh install of apache2 and http://localhost/ immediately gave
me a It works!.

How did you go about installing apache2? Can you manage to reproduce
this error?

** Changed in: apache2 (Ubuntu)
   Status: New = Incomplete

-- 
Accessing http://localhost gives without reason a 403 Forbidden error page
https://bugs.launchpad.net/bugs/370542
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to apache2 in ubuntu.

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs