httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <cliffwool...@yahoo.com>
Subject Re: Listen vs. Port
Date Fri, 10 Aug 2001 02:15:42 GMT
On Thu, 9 Aug 2001, Doug MacEachern wrote:

> if Listen is used to set the server port, and Port is not configured,
> ap_get_server_port returns the default port (80).  this breaks mod_dir
> redirects if Listen is something other than 80.

I thought that was the whole point of the Port directive in the first
place.

>From docs/manual/mod/core.html#port:
--------------------------------------------------------------

In the absence of any Listen directives specifying a port number, a Port
directive given in the "main server" (i.e., outside any <VirtualHost>
section) sets the network port on which the server listens. If there are
any Listen directives specifying :number then Port has no effect on what
address the server listens at.

The Port directive sets the SERVER_PORT environment variable (for CGI and
SSI), and is used when the server must generate a URL that refers to
itself (for example when creating an external redirect to itself). This
behaviour is modified by UseCanonicalName.

In no event does a Port setting affect what ports a VirtualHost responds
on, the VirtualHost directive itself is used for that.

The primary behaviour of Port should be considered to be similar to that
of the ServerName directive. The ServerName and Port together specify what
you consider to be the canonical address of the server. (See also
UseCanonicalName.)

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA



Mime
View raw message