Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In my nginx (1.4.2) setup on Ubuntu 12.04, I have set up only one configuration file (I deleted/disabled the others):

server {
  listen [::]:80 default_server;

  location / {
    root /home/lwood/websites/default/public;
  }
}

I have restarted nginx.

Why does nginx not accept IPv4 connections? Here are the docs

http://wiki.nginx.org/HttpCoreModule#listen

They mention that

In Linux by default any IPv6 TCP socket also accepts IPv4 traffic ... the runtime parameter: net.ipv6.bindv6only which has the value 0 by default.

I have checked with sysctl, bindv6only is indeed set to 0. So my IPv6 listen directive should accept IPv4 as well, right?

I must be misunderstanding the docs. An explanation would be appreciated.

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

The wiki is out of date. As specified in the actual documentation, the default for ipv6only is on since nginx 1.3.4. If you omit the parameter, then nginx will only bind to IPv6. The OS settings are never used.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.