remote_addr(::1)不返回IPv4地址127.0.0.1的解决办法
Turn off IPv6 in Apache
To turn off IPv6 in Apache, just change the Listen directive to:
Listen 0.0.0.0:80
This will limit Apache to listening only to IPv4 connections. Repeat this for port 443 if you want to stop Apache from listening for HTTPS on IPv6.