httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <>
Subject Re: Is this an Apache 1.3 bug or a config problem?
Date Wed, 16 May 2001 04:41:07 GMT
In message <>, "Roy T. Fielding" writes:
>On Tue, May 15, 2001 at 09:36:47AM -0400, Bill Stoddard wrote:
>> At global scope I have the following config:
>> Port 80
>> Listen 8080
>> As documented, Apache listens on port 8080 (the Port setting is ignored and
>> the server will not listen on port 80).  Here is the bug... If I use the %p
>> log option to log the port the inbound request was received on, port 80 is
>> logged (not port 8080 as expected). r->server->port is set to 80.  This
>> looks like plain goofy behaviour to me.
>That sounds like a bug in mod_log_config.  r->server->port is not the port
>that the connection came in on.

According to mod_log_config:

   /* These next two routines use the canonical name:port so that log
    * parsers don't need to duplicate all the vhost parsing crud.
   static const char *log_virtual_host(request_rec *r, char *a)
       return r->server->server_hostname;
   static const char *log_server_port(request_rec *r, char *a)
       return apr_psprintf(r->pool, "%u",
           r->server->port ? r->server->port : ap_default_port(r));

I guess this is a feature then -- you will have to add another log formatting
directive if you want the actual port, or get rid of the Port 80 config.


View raw message