万能的MJJ,解决下套cf tunnel后nginx日志获取不到正确IP问题
安装的是LNMP
nginx.conf
nginx.conf
- http { map $HTTP_CF_CONNECTING_IP $clientRealIp { "" $remote_addr; ~^(?P<firstAddr>[a-z0-9.:]+),?.*$ $firstAddr; } log_format access '$clientRealIp [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '$http_user_agent $remote_addr $request_time';