On Sun, Jan 18, 2009 at 2:36 PM, wolfgang <wolfgang...@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 cove...@gmail.com