使用CDN加速不能正确获取用户真实IP地址问题,帮忙

「已注销」 2017-09-18 01:21:14
centos服务器,nginx用的百度云加速,获取不到真实的ip地址,
好像听说要需要nginx或apache配置php模块参数才能正确返回真实IP
具体应该怎么弄啊
...全文
843 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
「已注销」 2017-09-18
  • 打赏
  • 举报
回复
看网上有说的方法,我加了以下百度云加速的ip但还是获取不到真实ip set_real_ip_from 111.32.135.0/24 ; set_real_ip_from 111.32.136.0/24 ; set_real_ip_from 125.39.174.0/24 ; set_real_ip_from 125.39.239.0/24 ; set_real_ip_from 112.65.73.0/24 ; set_real_ip_from 112.65.74.0/24 ; set_real_ip_from 112.65.75.0/24 ; set_real_ip_from 119.84.92.0/24 ; set_real_ip_from 119.84.93.0/24 ; set_real_ip_from 113.207.100.0/24 ; set_real_ip_from 113.207.101.0/24 ; set_real_ip_from 113.207.102.0/24 ; set_real_ip_from 180.163.188.0/24 ; set_real_ip_from 180.163.189.0/24 ; set_real_ip_from 163.53.89.0/24 ; set_real_ip_from 101.227.206.0/24 ; set_real_ip_from 101.227.207.0/24 ; set_real_ip_from 119.188.97.0/24 ; set_real_ip_from 119.188.9.0/24 ; set_real_ip_from 61.155.149.0/24 ; set_real_ip_from 61.156.149.0/24 ; set_real_ip_from 61.155.165.0/24 ; set_real_ip_from 61.182.137.0/24 ; set_real_ip_from 61.182.136.0/24 ; set_real_ip_from 120.52.29.0/24 ; set_real_ip_from 120.52.113.0/24 ; set_real_ip_from 222.216.190.0/24 ; set_real_ip_from 219.159.84.0/24 ; set_real_ip_from 183.60.235.0/24 ; set_real_ip_from 116.31.126.0/24 ; set_real_ip_from 116.31.127.0/24 ; set_real_ip_from 117.34.13.0/24 ; set_real_ip_from 117.34.14.0/24 ; set_real_ip_from 42.236.93.0/24 ; set_real_ip_from 42.236.94.0/24 ; set_real_ip_from 119.167.246.0/24 ; set_real_ip_from 150.138.149.0/24 ; set_real_ip_from 150.138.150.0/24 ; set_real_ip_from 150.138.151.0/24 ; set_real_ip_from 117.27.149.0/24 ; set_real_ip_from 59.51.81.0/24 ; set_real_ip_from 220.170.185.0/24 ; set_real_ip_from 220.170.186.0/24 ; set_real_ip_from 183.61.236.0/24 ; set_real_ip_from 14.17.71.0/24 ; set_real_ip_from 124.95.168.0/24 ; set_real_ip_from 124.95.188.0/24 ; set_real_ip_from 61.54.46.0/24 ; set_real_ip_from 61.54.47.0/24 ; set_real_ip_from 101.71.55.0/24 ; set_real_ip_from 101.71.56.0/24 ; set_real_ip_from 183.232.51.0/24 ; set_real_ip_from 183.232.53.0/24 ; set_real_ip_from 157.255.25.0/24 ; set_real_ip_from 157.255.26.0/24 ; set_real_ip_from 182.150.0.0/24 ; set_real_ip_from 182.150.1.0/24 ; set_real_ip_from 112.25.90.0/24 ; set_real_ip_from 112.25.91.0/24 ; set_real_ip_from 58.211.2.0/24 ; set_real_ip_from 58.211.137.0/24 ; set_real_ip_from 122.190.2.0/24 ; set_real_ip_from 122.190.3.0/24 ; set_real_ip_from 183.61.177.0/24 ; set_real_ip_from 183.61.190.0/24 ; set_real_ip_from 117.148.160.0/24 ; set_real_ip_from 117.148.161.0/24 ; set_real_ip_from 115.231.186.0/24 ; set_real_ip_from 115.231.187.0/24 ; real_ip_header X-Real-IP; real_ip_recursive on;
xuzuning 2017-09-18
  • 打赏
  • 举报
回复
print_r($_SERVER); 贴出来看看

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧