[lug] Strange Apache VirtualHost behavior
Lee Woodworth
blug-mail at duboulder.com
Tue Nov 23 23:50:38 MST 2004
David Morris wrote:
> On Mon, Nov 22, 2004 at 11:24:15PM -0700, Lee Woodworth wrote:
>
>>You fixed it? I just looked at
>> http://david.morris-clan.net/foo (no trailing slash)
>>and it redirects to
>> http://david.morris-clan.net/foo/
>>which has cats.html in it.
>
>
> Now that is odd because it does *not* do that for me.
>
> <sigh>
>
> What web browser are you using? I wonder if perhaps
> Mozilla/Firefox aren't sending the right information.
>
> --David
I used Firefox 1.0 release, but through apache 2.0.48 acting as a proxy.
It looks like firefox may have added the trailing slash. The access log
entry from the proxy (when the browser address didn't have the trailing /):
10.0.0.1 - - [23/Nov/2004:22:52:18 -0700]
"GET http://david.morris-clan.net/foo/ HTTP/1.1" 200 954
Using nc from netcat (bypasses the proxy, no request headers sent):
# nc david.morris-clan.net 80
GET /foo HTTP/1.0
HTTP/1.1 404 Not Found
Date: Wed, 24 Nov 2004 06:20:52 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /foo was not found on this server.<P>
<HR>
<ADDRESS>Apache/1.3.26 Server at morris-clan.net Port 80</ADDRESS>
</BODY></HTML>
Did you just add a manual redirect? I am now getting (added the HOST
header, previous request didn't have it):
# nc david.morris-clan.net 80
GET /foo HTTP/1.0
HOST: david.morris-clan.net
HTTP/1.1 301 Moved Permanently
Date: Wed, 24 Nov 2004 06:40:50 GMT
Server: Apache/1.3.26 (Unix) Debian GNU/Linux PHP/4.1.2
Location: http://david.morris-clan.net/foo/
Connection: close
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved <A
HREF="http://david.morris-clan.net/foo/">here</A>.<P>
<HR>
<ADDRESS>Apache/1.3.26 Server at david.morris-clan.net Port
80</ADDRESS>
</BODY></HTML>
More information about the LUG
mailing list