Nginx with Varnish as a proxy. Phantom Port 80
Robert Paprocki
rpaprocki at fearnothingproductions.net
Fri Apr 1 04:33:17 UTC 2016
Without showing your nginx config it's unlikely that anyone will be able to
troubleshoot. Likely there is a stray listen directive that's causing this.
On Thu, Mar 31, 2016 at 9:29 PM, plutocrat <nginx-forum at forum.nginx.org>
wrote:
> Hi,
>
> I'm having an odd problem here. I'm trying to set up nginx with a varnish
> proxy in front of it. The box is Ubuntu 15.10, nginx 1.9.3, varnish 4.0.3.
>
> For testing I set up varnish on port 8080, and nginx was running on port 80
> and 443. I shut down both, edit the config files so that varnish is
> listening on port 80 and forwarding to the nginx backend on 8080. I do a
> search and replace on all the listen directives in /etc/nginx/sites-enabled
> to change listen 80 to listen 8080.
>
> When I restart nginx, it comes up listening on port 8080 and 443 as
> expected, but ALSO on port 80. This means varnish is unable to start up as
> the port is already bound.
>
> tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
> 17514/nginx -g daem
> tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
> 17514/nginx -g daem
> tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN
> 17514/nginx -g daem
>
> I've checked through the nginx conf files many times. There are no other
> listen 80 directives. I've also tried putting a server block in the main
> nginx.conf with listen 8080 in it, but that doesn't help.
>
> I think the problem may be that this system is confused between systemd and
> init.d. I was having trouble with varnish in this respect. However I've
> checked all the systemd files and none of them mention a port, and the
> /etc/init.d/nginx file doesn't either.
>
> Why is nginx using port 80? And how to stop it! Any pointers gratefully
> received.
>
> Posted at Nginx Forum:
> https://forum.nginx.org/read.php?2,265791,265791#msg-265791
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20160331/8cff6295/attachment.html>
More information about the nginx
mailing list