httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Covener" <cove...@gmail.com>
Subject Re: How to get a port number.
Date Sun, 18 Jan 2009 20:25:05 GMT
On Sun, Jan 18, 2009 at 2:36 PM, wolfgang <wolfgang127@gmail.com> wrote:
> Hi there,
>
> I can not get a port number if my apache module is set in the main
> server config and listen port is set to 10080.
> ( "the main server config" means other than virtual host configs. )
>
> When my apache module is set in the main server config as follows and
> a client requests "http://www.example.com:10080".
>
> In httpd.conf,
> ...
> Listen 10080
> <Location "/">
>   SetHandler mymodule
> </Location>
> ....
>
> Then, in mymodule I get the following results.
>
> request_rec->server->is_virtual is 0.
> ap_get_server_port(request_rec)" is 80.          <----- 80 !? why not 10080 ??
> request_rec->server->port is 0.                      <----- ZERO !? hm...
> request_rec->server->addrs->host_port is 0.   <----- ZERO... Sure, my
> module is not in a virtual host.
>

Maybe http://httpd.apache.org/docs/2.2/mod/core.html#usecanonicalphysicalport ?

(or ServerName if it's the only Listen)

-- 
Eric Covener
covener@gmail.com

Mime
View raw message