P
P
Platinumixq2015-01-22 04:26:42
Nginx
Platinumixq, 2015-01-22 04:26:42

rpaf_module not working, what should I do?

rpaf_module is enabled, here are its settings
RPAFenable On
# When enabled, take the incoming X-Host header and
# update the virtualhost settings accordingly:
RPAFsethostname On
# Define which IP's are your frontend proxies that sends
# the correct X-Forwarded-For headers:
RPAFproxy_ips 127.0.0.1 ::1 127.0.0.2 server_ip
# Change the header name to parse from the default
# X-Forwarded-For to something of your choice:
# RPAFheader X-Real-IP
Settings nginx
location / {
proxy_pass http://server_ip :8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Server-Address $server_addr;
}
In phpinfo, the HTTP_X_REAL_IP and HTTP_X_FORWARDED_FOR variables have the correct user IP, and REMOTE_ADDR does not contain the remote user's ip, but the server's IP.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
3
3vi1_0n3, 2015-01-22
@3vi1_0n3

So have you tried it?
There is a difference?
Well, this is how I would try:
proxy_set_header REMOTE_ADDR $remote_addr

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question