Questions tagged [mod-rpaf]

reverse proxy add forward module for Apache (mod_rpaf) It changes the remote address of the client visible to other Apache modules

reverse proxy add forward module for Apache (mod_rpaf)

rpaf is for backend Apache servers what mod_proxy_add_forward is for frontend Apache servers. It does exactly the opposite of mod_proxy_add_forward.

It changes the remote address of the client visible to other Apache modules when two conditions are satisfied. First condition is that the remote client is actually a proxy that is defined in httpd.conf. Secondly if there is an incoming X-Forwarded-For header and the proxy is in it's list of known proxies it takes the last IP from the incoming X-Forwarded-For header and changes the remote address of the client in the request structure. It also takes the incoming X-Host header and updates the virtualhost settings accordingly. For Apache2 mod_proxy it takes the X-Forwared-Host header and updates the virtualhosts

10 questions
10
votes
3 answers

mod_rpaf problems with Nginx front, Apache back-end after Ubuntu upgrade

I'm running an Nginx front-end for static files, and proxying to an Apache backend for PHP and Passenger, using Apache's mod_rpaf to set the correct remote IP address on the backend. Everything worked fine until I upgraded to Ubuntu 12.04 (Precise).…
Kenn
  • 145
  • 2
  • 7
4
votes
0 answers

Apache 2.4 RPAFsethostname equivalent

We had a 2.2 server running with mod_rpaf with configuration directives like this: LoadModule rpaf_module modules/mod_rpaf-2.0.so RPAFenable On RPAFsethostname On RPAFheader X-Forwarded-For Now with 2.4, it seems we do something like…
mmucklo
  • 141
  • 2
3
votes
3 answers

nginx doesn't forward ip in headers to apache (rpaf is enabled)

I'm trying to set up nginx as front-end and apache as back-end on my server. All goes as usual, I've installed libapache2-mod-rpaf. But apache doesn't see real client ip and some .htaccess restrictions based on ip don't work at all, cause apache…
rush
  • 1,961
  • 2
  • 15
  • 22
3
votes
3 answers

mod_rpaf behind an Amazon ELB

I've got mod_rpaf installed to get the user's IP address from the X-Forwarded-For header in PHP, Apache logs, etc. Unfortunately, it looks like I have to explicitly set which IPs that header will be respected from via the RPAFproxy_ips…
ceejayoz
  • 32,469
  • 7
  • 81
  • 105
2
votes
1 answer

mod_rpaf not recognising RPAFheader setting

After installing mod_rpaf, I set my config file (/etc/apache2/mods-available/rpaf.conf) as follows: RPAFenable On RPAFsethostname On RPAFproxy_ips 127.0.0.1 RPAFheader X-Real-IP However, now when I…
Jonathan
  • 1,279
  • 2
  • 20
  • 28
2
votes
2 answers

mod_rpaf with apache error_log

I'm using mod-rpaf with Apache 2.4 and it's working properly (showing the real client IP's) in my Apache access_log... but not in my error_log. My error log just shows the client IP address of the proxy server (my load balancer in this case) Here's…
Camden S.
  • 230
  • 2
  • 7
1
vote
2 answers

varnish3, mod_geoip with apache2 using mod_rewrite and mod_rpaf

I am maintaining a website with 3 different versions of the site, with 3 different languages, handles with a single system written in php, which takes in environment variables based on the domain name that is being accessed. These are the three…
mercy
  • 131
  • 5
0
votes
1 answer

Reverse proxy nginx to apache, https in php

I'm following this tutorial for configuring nginx as a reverse proxy for apache, everything works except for the last two sections. From section 8 about configuring mod_rpaf, phpinfo should return $_SERVER['REMOTE_ADDR'] = '146.185.137.240', but I…
0
votes
1 answer

mod_security behind reverse proxy and clients IP

client -> haproxy -> mod_security boxes -> backends Problem: mod_security boxes use mod_rpaf with ip of haproxy in 'RPAFproxy_ips'. Apache logging shows clients real ip but mod_security still reports haproxys ip as seen below. Clients ip found in…
3molo
  • 4,340
  • 5
  • 30
  • 46
0
votes
1 answer

Varnish reverse proxy, apache backend, forward IP is not working consistently

This is my vcl config file section related for IP forwarding: sub vcl_recv { remove req.http.X-Forwarded-For; set req.http.X-Forwarded-For = client.ip; .... (other configuration) } sub vcl_pipe { set req.http.connection =…
Siva
  • 1
  • 1