httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron W Morris <aaronmor...@mindspring.com>
Subject Re: [users@httpd] Modifing the behavior of mod_dir redirects
Date Mon, 23 Jun 2003 18:41:32 GMT
On Fri, 2003-06-20 at 18:46, Joshua Slive wrote:
> On Fri, 20 Jun 2003, Aaron Morris wrote:
> > ie  A request to "http://httpd.apache.org/docs", mod_dir issues a 301
> > redirect to "http://httpd.apache.org/docs/".  In my environment, since
> > Apache receives the request on a different port number the redirect
> > reflects the internal port number instead of the port from the
> > perspective of the internet.  ie  "http://httpd.apache.org:10000/docs/"
> 
> Set
> UseCanonicalName On
> Listen 80
> Port 10000
> 
> Check the docs on all three of these directives (as well as ServerName).
> You'll see that, when a Listen directive is present, the Port directive
> does not set the actual port used by apache, but only the port used in
> redirects (and similar self-identifying actions).

I appreciate the info; it really helped me understand the purpose of
those directives.  While reading the info about "UseCanonicalName" I
realized that the docs are actually incorrect when it talks about how
Apache gets the port information.

Quoted from the Apache docs:
"With UseCanonicalName off Apache will form self-referential URLs using
the hostname and port supplied by the client if any are supplied..."

It looks like Apache completely ignores port information supplied by the
client.


------------
ws001[/home/user]$ nc -v localhost 12175
loopback [127.0.0.1] 12175 (?) open
GET /images HTTP/1.0
Host: www.blah.com:81

HTTP/1.1 301 Moved Permanently
Date: Mon, 23 Jun 2003 18:39:13 GMT
Server: IBM_HTTP_SERVER
Location: http://www.blah.com:12175/images/
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://www.blah.com:12175/images/">here</A>.<P>
</BODY></HTML>
------------

Is this a bug or are the docs wrong?

> 
> Joshua.
> 
> ---------------------------------------------------------------------
> 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
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message