httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Eilebrecht <>
Subject Re: Listen vs. Port
Date Mon, 13 Aug 2001 18:35:59 GMT
According to Ryan Bloom:

>  You can not get rid of the Port directive.  It is an important directive
>  that is there to allow admins to configure their server to report a
>  different port than it actually uses.  This is the exact same as the
>  ServerName directive, which is another one that can't go away.

Yes, that's true, we cannot get rid of the funtionality provided by
the Port directive.
But maybe we should think about a different way to configure this
in Apache 2.0, because in some situations (e.g., you're behind
a load balancing device or reverse proxy and need to configure a
different name and port number for self-referencing replies
or any CGIs using SERVER_NAME etc.). But the configuration is
often not very intuitional.

Basically we have three different directives manimuplation
the servername and port number in replies: ServerName, Port
and UseCanonicalName.

I like Dean's idea to combine ServerName and Port, but then
there's still UseCanonicalName.

How about this idea (for 2.0):

- Remove Port directive and make Listen the only directive
  defining ports to listen on.

- Make Listen require an IP address, e.g.,
  if only an address is given it should default to port 80.
  The definition of Listen should be mandatory.

- Make ServerName accept only a FQDN followed by a port
  number as an argument, e.g., www.domain.tld:8080.
  This value should be used for any self-referencing replies
  and as a source for the variables SERVER_NAME, SERVER_PORT
  Default values should be the port number and IP address
  from the Listen directive.
  Add a special argument, e.g., "auto" to provide the
  functionality of "UseCanonicalName On" (use the values
  supplied by the client's host header).
  (Should we continue to provide the functionality of
   "UseCanonicalName DNS"? IMHO we should not.)

- Remove UseCanonicalName directive

Any comments?

If we do these changes it might be a good idea to start
re-thinking our virtual host configuration, especially
the concept of main server vs. default server vs. vhost.

Lars Eilebrecht            - The chief cause of problems is solutions.                                     (Eric Sevareid)

View raw message