Description of problem: Wrong remote (local) port number on logging of the requests. Steps to Reproduce: 1. Create minimal server config: --%<-- ServerRoot "/tmp/foo" DocumentRoot "/tmp/foo" PidFile /tmp/foo/foo-httpd.pid LoadModule log_config_module /usr/lib/httpd/modules/mod_log_config.so User nobody Group nobody ErrorLog foo-error_log LogFormat "localport:%{local}p remoteport:%{remote}p" testformat CustomLog foo-access_log testformat Listen 127.1.2.3:8765 --%<-- 2. Start server: /usr/sbin/httpd -f /tmp/foo/foo-httpd.conf -k start 3. Request document: wget http://127.1.2.3:8765/ 4. Lookup access log foo-access_log Actual results: localport:80 remoteport:80 Expected results: localport:8765 remoteport:xxxx Additional info: seem to be fixed upstream in 2.2.9 apache httpd *) mod_log_config: Add format options for %p so that the actual local or remote port can be logged. PR 43415. [Adam Hasselbalch Hansen <ahh>, Ruediger Pluem, Jeff Trawick] Please Upgrade httpd package or do a backport of this fix. Kind Regrads, Roland
BTW: Because logging remote port in like this (old style): LogFormat "%{REMOTE_PORT}e" testformat is always empty (-), I can not see any possibility to log the source port of requests?
Adding the format options is very simple; thanks for the request. I don't think that REMOTE_PORT would be set in the environment unless a CGI/SSI script is being executed; so without %{remote}p support, no, there probably isn't any easy way.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1380.html