The mod_log_remote_port module is based on the Blackbox Logs article I wrote for O'Reilly. I figured that since Apache still didn't have a native method to log the client port, and since some users may not want to recompile their HTTP build, I'd create a standalone apache module to handle the directive.
The code is under 100 lines, and the majority of the functionality was learned just by examining the code from the mod_logio module. It has been test built as a dynamic DSO using the apxs interface.
$ apxs -c mod_log_remote_port.c
LoadModule log_remote_port_module modules/mod_log_remote_port.so
LogFormat "%a/%S %X %t \"%r\" %s/%>s %{pid}P/%{tid}P %T/%D %I/%O/%B" blackbox
--with-module=loggers:mod_log_report_port.cIt looks like with Apache 2.0.59, you need to use:
--with-module=loggers:log_report_port
For some reason, the build process wants the module named
log_remote_port_module when building a static module. The linker
prepends _module (or expects _module) at the end of the module name. I need
to do more research on this.
No running bugs have been encountered.
Original test environment was a AMD Turion laptop running Solaris Nevada build 37 against Apache version 2.0.58. Code has also been tested in a RHES AS 3 environment with a custom apache with mod_perl build.
If you have questions or compile problems, send me an email.