server listen directive for IPV4 and IPV6

shiz nginx-forum at
Thu Mar 16 03:48:11 UTC 2017

There is a lot of confusion in the answers I fount about it.

When I installed nginx first, it was the debian jessie version 1.6.2 and the
configuration to listen to both ipv4 and ipv6 was 

#server {
#       listen 80;
#       listen [::]:80;
#       server_name;
#       root /var/www/;
#       index index.html;
#       location / {
#               try_files $uri $uri/ =404;
#       }

Now I use nginx 1.11.10 and the example configuration file only has one
listen       80;

Should I update my configuration?  I might be wrong but I did not see ipv6
requests for a long while.

Last time I changed the listen directive following some recommendation found
on the web, I ended up with servers not listening to anything!

Posted at Nginx Forum:,272973,272973#msg-272973

More information about the nginx mailing list