On Ubuntu, Nginx apparently listens on all of the IPs in 127.0.0.0/8
. How can I disable listening on 127.0.0.0
and 127.0.0.2
–127.255.255.255
? That is, the only IPv4 loopback address that I want Nginx to listen on is 127.0.0.1
. Answers to this question should not affect Nginx listening on any other IP addresses (e.g., the server's LAN and WAN addresses).
Stop nginx listening on all IPs? is a related question, but this question is specific to disabling Nginx on the loopback interfaces only without limiting it to a single listening IP.