rpaf_module подключён, вот его настройки
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 ip_сервера
# Change the header name to parse from the default
# X-Forwarded-For to something of your choice:
# RPAFheader X-Real-IP
Настройки nginx
location / {
proxy_pass
http://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;
}
В phpinfo переменные HTTP_X_REAL_IP и HTTP_X_FORWARDED_FOR имеют правильный IP пользователя, а REMOTE_ADDR содержит не ip удалённого пользователя а IP сервера.