![mod_remoteip 未显示访问者的真实 ip](https://linux22.com/image/227221/mod_remoteip%20%E6%9C%AA%E6%98%BE%E7%A4%BA%E8%AE%BF%E9%97%AE%E8%80%85%E7%9A%84%E7%9C%9F%E5%AE%9E%20ip.png)
我正在尝试获取 cloudflare 背后的真实 ip,按照我在 google 上找到的方法,安装了 mod_remoteip,然后按如下方式配置它:
LoadModule remoteip_module modules/mod_remoteip.so
RemoteIPHeader X-Forwarded-For
RemoteIPTrustedProxy 103.21.244.0/22
RemoteIPTrustedProxy 103.22.200.0/22
RemoteIPTrustedProxy 103.31.4.0/22
RemoteIPTrustedProxy 104.16.0.0/13
RemoteIPTrustedProxy 104.24.0.0/14
RemoteIPTrustedProxy 108.162.192.0/18
RemoteIPTrustedProxy 131.0.72.0/22
RemoteIPTrustedProxy 141.101.64.0/18
RemoteIPTrustedProxy 162.158.0.0/15
RemoteIPTrustedProxy 172.64.0.0/13
RemoteIPTrustedProxy 173.245.48.0/20
RemoteIPTrustedProxy 188.114.96.0/20
RemoteIPTrustedProxy 190.93.240.0/20
RemoteIPTrustedProxy 197.234.240.0/22
RemoteIPTrustedProxy 198.41.128.0/17
RemoteIPTrustedProxy 2400:cb00::/32
RemoteIPTrustedProxy 2606:4700::/32
RemoteIPTrustedProxy 2803:f800::/32
RemoteIPTrustedProxy 2405:b500::/32
RemoteIPTrustedProxy 2405:8100::/32
RemoteIPTrustedProxy 2a06:98c0::/29
RemoteIPTrustedProxy 2c0f:f248::/32
当我检查 $_SERVER['HTTP_CF_CONNECTING_IP'] 时,该 IP 不是我的真实 IP,并且 $_SERVER 中没有设置 HTTP_X_FORWARDED_FOR ,该怎么办?
我添加了在 Cloudflare 列表中找到的 IP 列表作为 RemoteIPTrustedProxy,但这不起作用。