Apache::ForwardedFor

Re-set remote_ip to incoming client's ip when running mod_perl behind a reverse proxy server.
Download

Apache::ForwardedFor Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jay J. Lawrence
  • Publisher web site:
  • http://search.cpan.org/~jlawrenc/

Apache::ForwardedFor Tags


Apache::ForwardedFor Description

Re-set remote_ip to incoming client's ip when running mod_perl behind a reverse proxy server. Apache::ForwardedFor is a Perl module to re-set remote_ip to incoming client's ip when running mod_perl behind a reverse proxy server. In other words, copy the first IP from X-Forwarded-For header, which was set by your reverse proxy server, to the remote_ip connection property.SYNOPSIS in httpd.conf PerlModule Apache::ForwardedFor PerlPostReadRequestHandler Apache::ForwardedFor PerlSetVar ForwardedForAccept 192.168.1.1 PerlAddVar ForwardedForAccept 192.168.1.2We often want to run Apache behind a reverse proxy so that we can delegate light-weight (static content) requests to a small httpd and proxy heavy-weight requests (dynamic mod_perl generated content) to a big httpd. This is a well known technique to overcome the memory contraints of running a busy mod_perl site.A small problem when doing this is that our "remote_ip" for the backend (mod_perl) httpd is that of the front-end proxy'ing httpd. This is not a good representation of the end client's real IP address - making it difficult to implement IP-based access control and tracking usage through your logs. Requirements: · Perl


Apache::ForwardedFor Related Software