Unable to open Port 8080 for Varnish to access Nginx
The listen mydomain.co.in:8080;
directive in your Nginx config is probably the issue.
Nginx will only listen on the network interface for the IP that is resolved by the domain. I'm well aware that the domain is redacted for the sake of privacy. But you probably know what I mean.
This is also reflected by the 139.99.99.99:8080
local address in your netstat
output.
The localhost
address doesn't resolve to that IP address, and uses the loopback interface. So that's probably why it won't work.
Please change your Nginx listen address as follows:
listen 8080;
This will bind the Nginx process to all available network interfaces on that server, including localhost
.