Closed mpdude closed 10 years ago
As mpdude pointed out above the only change we have to make to support 2.4 is to move from remote* to client* and everything else is good to go. I've compiled it with the changes and have deployed it into my infrastructure as a replacement for mod_rpaf 0.6 provided from the repos. I'll keep an eye out but everything looks good at this point. If anyone doesn't want to mod themselves my fork over at https://github.com/joshboon/mod_rpaf has the 2.4 changes and is what I'm currently running.
Can you please make this a pull request, I will merge and test + fix anything broken if needed to get this into mod_rpaf. Thanks for the efforts in tracking this down.
Here you go.
This is different from the patch above because there have been some refactorings in the mean time. I did not yet have the possibility to compile/test it.
Please note the following lines in the APache 2.4 changelog:
conn_rec->remote_ip and conn_rec->remote_addr These fields have been renamed in order to distinguish between the client IP address of the connection and the useragent IP address of the request (potentially overridden by a load balancer or proxy). References to either of these fields must be updated with one of the following options, as appropriate for the module: When you require the IP address of the user agent, which might be connected directly to the server, or might optionally be separated from the server by a transparent load balancer or proxy, use request_rec->useragent_ip and request_rec->useragent_addr. When you require the IP address of the client that is connected directly to the server, which might be the useragent or might be the load balancer or proxy itself, use conn_rec->client_ip and conn_rec->client_addr. -- http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html
This looks a bit like the Apache core now makes a difference between the proxy and the user agent itself. Not sure if that has more subtle implications for this module than a simple search and replace of a renamed struct element?
Maybe we should have a branch/tag for the last working 2.2 version?
You should look at the source, it is still 2.2 compatible.
Currently, this module does not compile for Apache 2.4 - but I would like to see support for it! :+1:
mod_rpaf has a unique selling point, namely the ability to read the X-Forwarded-Port/X-Forwarded-Proto headers. That allows to use Amazon EC2's Elastic Load Balancers for transparent SSL termination: http://www.webfactory.de/blog/transparent-ssl-termination-on-amazon-elb-with-mod-rpaf
mod_remoteip seems to be the favored solution contained in the Apache core, but it is not capable of handling this setup.
Here are the API changes: http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html
The following patch at least allows me to compile the module, but I haven't yet had the possiblity to test it in any way...