httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: Incorrect behaviour in ap_get_server_port()?
Date Tue, 20 Feb 2001 02:26:49 GMT
Lars Oppermann <lars.oppermann@germany.sun.com> wrote:
>
>Now, whenever a self-referencing, absolute URL is to be constructed, it
>has to point to said application responsible for request distribution,
>and not to the particular Apache server that generated the response
>containing this URL. To achive this, we set the 'Host:' header in the
>request sent from the distributing application to the Apache server
>accordingly. This does indeed work for hostnames, but not for
>Portnumbers (UseCanonicalName is turned off in Apache).

Gosh, this is becoming a *very* frequently asked question. I'm not
sure where we can improve the documentation to make it clearer, though.

Use the "Listen" directive to configure the port that Apache listens
on, and use the "Port" directive to configure the port that Apache
uses to refer to itself.

e.g. with
	Listen 8000
	Port 80
Apache accepts requests on port 8000 but when generating redirects or
other self-referential URLs it uses port 80. This is designed to work
in exactly your situation.

Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
VIKING NORTH UTSIRE SOUTH UTSIRE: WEST OR NORTHWEST 5 INCREASING 6 OR 7. RAIN
THEN SHOWERS. MODERATE OR GOOD.

Mime
View raw message