Symptoms
You see the localhost IP address as the client address in the NGINX access log on CloudLinux servers.
127.0.0.1 - - [17/Jan/2024:15:57:33 +0700] "GET / HTTP/1.1" 302 200 "https://domain.tld/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0" "203.0.113.2"
Description
Imunify360 doesn't support NGINX with Reverse Proxy. The imunify360-webshield.conf
file must be modified so that the correct IP can be listed in the NGINX log.
Workaround
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Run the following command.
echo 'set_real_ip_from 127.0.0.1;' >> /etc/nginx/conf.d/server-includes/imunify360-webshield.conf
- Rebuild the NGINX configuration.
/usr/local/cpanel/scripts/ea-nginx config --all
- Restart the NGINX service.
/usr/local/cpanel/scripts/restartsrv_nginx
Comments
0 comments
Article is closed for comments.