Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question