[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: nginx stops because it blocks itself



On Sun, 12 May 2013 18:25:27 +0200
Jean-Marc <jean-marc@6jf.be> wrote:

> Some follow up about this problem.
> 
> On Sun, 12 May 2013 15:53:23 +0200
> Jean-Marc <jean-marc@6jf.be> wrote:
> 
> The problem comes from the config' sites-enabled/default specifying directives listen:
> 	listen 80;
> 	listen [::]:80 default_server;
> 
> But I found this in the nginx doc' (http://wiki.nginx.org/HttpCoreModule#listen),
> " When you enable the address [::]:80, binding port 80 using IPv6, in the listen directive, in Linux, by default, the IPv4 port 80 is also enabled. Meaning that nginx listens for both IPv4 and IPv6 incoming traffic. Therefore if you erroneously specify also a IPv4 address you'll get an already bind address error when reloading nginx configuration. "
> 
> And if I removed directive "liste 80;", nginx starts.
> 
> You can separate IPv4 and v6 stacks using net.ipv6.bindv6only but default value doest not.
> 
> So, Debian nginx config' is incorrect.
> 
> Bugreport ?
> 
No need to report a bug, it is already done:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=707110

In case of similar problem, just replace this line in /etc/nginx/sites-enabled/default
- listen [::]:80 default_server;
+ listen [::]:80 default_server ipv6only=on;

-- 
Jean-Marc <jean-marc@6jf.be>

Attachment: pgpql2g6aSMUA.pgp
Description: PGP signature


Reply to: