문제

I used nginx in front and apache for backend, also varnish for caching

now, IP of all of the visitors return as 127.0.0.1

How can I config my server to return real ip of customers?

I did test many ways but none of them correct and work for me!

도움이 되었습니까?

해결책

Problem solved!

Just change nginx config!

open

/etc/nginx/nginx.conf

And add the following lines to your http{} statement

set_real_ip_from   127.0.0.1;
real_ip_header     X-Forwarded-For;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top