Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

Problem forwarding RemoteIP from proxy to apache (mod_rpaf)

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
2 posts • Page 1 of 1
joschi
Posts: 10
Joined: Sat Sep 27, 2014 3:41 am

Problem forwarding RemoteIP from proxy to apache (mod_rpaf)
  • Quote

Post by joschi » Tue Jan 06, 2015 1:40 pm

Hey everyone and happy new year :)

i have a problem with forwarding the remote ips from nginx to apache:

ive added the following lines to the configuration templates of nginx under /usr/local/vesta/data/templates/web/nginx

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

then i enabled mod rpaf with the following config

<IfModule rpaf_module>
RPAFenable On
RPAFsethostname On
RPAFproxy_ips 127.0.0.1 ::1
RPAFproxy_ips my.serverIP.stands.here
RPAFheader X-Real-IP
</IfModule>

still only the server ip shows up in logs... did i do something wrong?
any help on this topic is highly appreciated!

kind regards
patrick
Top

joschi
Posts: 10
Joined: Sat Sep 27, 2014 3:41 am

Re: Problem forwarding RemoteIP from proxy to apache (mod_rp
  • Quote

Post by joschi » Tue Jan 06, 2015 2:03 pm

ive found a workaround with remoteip:

1) a2enmod remoteip
2) create an config file under /etc/apache2/mods-available named remoteip.conf
3)add the following lines
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 127.0.0.1 your.proxy.server.ip
4) link the file under /etc/apache2/mods-enabled
5) service apache2 restart

it should work then for php
Top


Post Reply
  • Print view

2 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password