回复@表弟 :
http{ 后面加入这一段: set_real_ip_from 0.0.0.0/0; real_ip_header X-Forwarded-For; 我一直用的是这个也是可以获取到真实ip的
请勾选本项再提交评论