httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aaron Morris <>
Subject Re: [users@httpd] port redirect (separate, but related issue)
Date Sun, 06 Jul 2003 19:20:43 GMT
I posted a question on the same issue a week or two ago, but received no 

In the Apache documentation for "UseCanonicalName" it says:
"With UseCanonicalName off Apache will form self-referential URLs using 
the hostname and port supplied by the client if any are supplied..."

But from my experience and as is evident from this thread that Apache 
does NOT use port information supplied by the client to form 
self-referential URLs (it uses the port the connection was made on).

Here is an example from one of my environments where the webserver 
listens on a different port number (10000) than what you would connect 
to from the internet (80).  A frontend load-balancer does the port 
C:\>telnet 80
GET /home HTTP/1.0

HTTP/1.1 301 Moved Permanently
Date: Sun, 06 Jul 2003 18:50:11 GMT
Server: Apache
Connection: close
Content-Type: text/html; charset=iso-8859-1

<TITLE>301 Moved Permanently</TITLE>
<H1>Moved Permanently</H1>
The document has moved <A HREF="">here</A>.<P>

I have mitigated this issue by using mod_rewrite, but it does not change 
the fact that either the documentation is incorrect or Apache exhibits 
the incorrect behavior.

What needs to be done at this point?  Either the documentation needs to 
be corrected (or at least more clearly state the behavior) or notify the 
appropriate people about the "bug?" (through a bug report).  More or 
less, I'm trying to figure out if this is an Apache issue or a 
documentation issue.

Anyone want to take a shot at it?  :-)

Joshua Slive wrote:
> Whew, finally a few useful details ;-)
> Anyway, the answer remains the same, but I can now be more specific about
> how to impliment it.  Place the following in httpd.conf (in place of any
> existing Listen/Port directives):
> Listen 85
> Port 80
> ServerName
> UseCanonicalName On
> The Listen directive sets the actual port that apache will use to answer
> requests.  Port and ServerName tell apache how to identify itself when
> sending redirects.  UseCanonicalName tells apache to ignore the port and
> server name specified by the client in its request.
> Joshua.

Aaron W Morris <> (decep)
PGP Key ID:  259978D1

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message