通过apache“注意”(“GEOIP”u ADDR)获取用户的真实ip
如何启用apache_note(“GEOIP_ADDR”);获取我客户的真实IP地址 我们的网站通过代理服务器运行,直到上周,我们才能够通过通过apache“注意”(“GEOIP”u ADDR)获取用户的真实ip,apache,Apache,如何启用apache_note(“GEOIP_ADDR”);获取我客户的真实IP地址 我们的网站通过代理服务器运行,直到上周,我们才能够通过 $ip2=apache_note("GEOIP_ADDR"); echo $ip2; 对于那些不知道的人来说,这将是$headers[“X-Forwarded-For”]的一个很好的替代方案,但是我们最近无法做到这一点 下面是已加载Apache模块的列表 Loaded Modules: core_module (static) authn_file_
$ip2=apache_note("GEOIP_ADDR");
echo $ip2;
对于那些不知道的人来说,这将是$headers[“X-Forwarded-For”]
的一个很好的替代方案,但是我们最近无法做到这一点
下面是已加载Apache模块的列表
Loaded Modules:
core_module (static)
authn_file_module (static)
authn_default_module (static)
authz_host_module (static)
authz_groupfile_module (static)
authz_user_module (static)
authz_default_module (static)
auth_basic_module (static)
file_cache_module (static)
cache_module (static)
disk_cache_module (static)
mem_cache_module (static)
include_module (static)
filter_module (static)
deflate_module (static)
log_config_module (static)
logio_module (static)
env_module (static)
expires_module (static)
headers_module (static)
setenvif_module (static)
version_module (static)
proxy_module (static)
proxy_connect_module (static)
proxy_ftp_module (static)
proxy_http_module (static)
proxy_scgi_module (static)
proxy_ajp_module (static)
proxy_balancer_module (static)
ssl_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
status_module (static)
autoindex_module (static)
asis_module (static)
info_module (static)
suexec_module (static)
cgi_module (static)
negotiation_module (static)
dir_module (static)
actions_module (static)
userdir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
bwlimited_module (shared)
geoip_module (shared)
php5_module (shared)
pagespeed_module (shared)
Syntax OK
我失踪了
GeoIPScanProxyHeaders On
在
地理位置
GeoIPScanProxyHeaders打开
geoipdfile/usr/share/GeoIP/GeoIP.dat MemoryCache
geoipdfile/usr/share/GeoIP/GeoLiteCity.dat MemoryCache
这导致真正的IP没有出现
现在,它应该可以正常工作了
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPScanProxyHeaders On
GeoIPDBFile /usr/share/GeoIP/GeoIP.dat MemoryCache
GeoIPDBFile /usr/share/GeoIP/GeoLiteCity.dat MemoryCache
</IfModule>