httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owen Boyle <...@bourse.ch>
Subject Re: Need help with /
Date Fri, 12 Apr 2002 12:58:46 GMT
Søren Neigaard wrote:
> 
> I have a "erhverv" directory under "PROXY_IP/my/site_manager/static_html/",
> and if I do a "www.domain.dk/erhverv/" I get that directory just fine, but
> if ommit the last "/" I get 404, and now the PR guys want to be able to use
> "www.domain.dk/erhverv".

If you leave off the trailing slash, apache doesn't know whether you
want a file called "erhverv" in the docroot, or a subdirectory. So it
issues a redirect to http://www.domain.dk/erhverv/. But how does it get
the servername? It uses the ServerName directive - if that is missing
(as in your case) it uses the IP address hence the client gets the wrong
URL when the request following the redirect comes in. 

In other words:

Client: http://www.domain.dk/erhverv

Server: Sorry, don't have file like that, but I do have a directory.
I'll make you a redirect... Oh dear, no ServerName. Never mind, I'll use
the IP address. OK client, try http://192.168.1.1/erhverv/

Client: http://192.168.1.1/erhverv/

Server: Hmmm. No ServerName in this request - I'll just go to the first
VirtualHost then... Yikes! No file called erhverv! - oh well: 404....

Read the Docs about ServerName and UseCanonicalName to understand what's
going on.

Rgds,
Owen Boyle.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message