Bug 42746 - ap_get_server_port function always returns "80"
Summary: ap_get_server_port function always returns "80"
Status: CLOSED INVALID
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: Core (show other bugs)
Version: 2.2.4
Hardware: Sun SunOS
: P4 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords: APIBug
Depends on:
Blocks:
 
Reported: 2007-06-26 10:57 UTC by Tomasz Rybicki
Modified: 2007-07-24 00:57 UTC (History)
0 users



Attachments
My config file related to the issue. (4.86 KB, text/plain)
2007-06-28 02:22 UTC, Tomasz Rybicki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomasz Rybicki 2007-06-26 10:57:11 UTC
The function ap_get_server_port always returns "80", even if other port is
defined in configuration file. It has been observed on Solaris 10 and HP-UX.
Comment 1 Tomasz Rybicki 2007-06-26 10:58:34 UTC
It could be observed also when show output from mod_info module.
Comment 2 Ruediger Pluem 2007-06-26 12:42:34 UTC
Please post your configuration for the virtual host where this happens.
Especially let us know the settings for UseCanonicalPhysicalPort and
UseCanonicalName.

http://httpd.apache.org/docs/2.2/en/mod/core.html#usecanonicalname
http://httpd.apache.org/docs/2.2/en/mod/core.html#usecanonicalphysicalport
Comment 3 Tomasz Rybicki 2007-06-28 02:22:13 UTC
Created attachment 20409 [details]
My config file related to the issue.
Comment 4 Tomasz Rybicki 2007-06-28 02:24:39 UTC
(In reply to comment #2)
> Please post your configuration for the virtual host where this happens.
> Especially let us know the settings for UseCanonicalPhysicalPort and
> UseCanonicalName.
> 
> http://httpd.apache.org/docs/2.2/en/mod/core.html#usecanonicalname
> http://httpd.apache.org/docs/2.2/en/mod/core.html#usecanonicalphysicalport

OK, I have added the attachement which is designed for my server.

UseCanonicalPhysicalPort  - it is not set in the configuration file, so default
value is used.

UseCanonicalName - is set to: On
Comment 5 Ruediger Pluem 2007-06-28 14:32:25 UTC
I guess this is an error in your configuration. Please try the following:
Either replace

ServerName xxxx.pl.xxxx.com

with

ServerName xxxx.pl.xxxx.com:8811

or set

UseCanonicalPhysicalPort on

See also the Note in 
http://httpd.apache.org/docs/2.2/en/mod/core.html#usecanonicalphysicalport
Comment 6 Tomasz Rybicki 2007-07-24 00:53:49 UTC
(In reply to comment #5)

It seems that the problem was related to the configuration. I've changed it
according to your comment and I got the correct port number. 
Comment 7 Tomasz Rybicki 2007-07-24 00:55:59 UTC
Thanks a lot for your support and quick answer !