Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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
up vote 5 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

Your Answer


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.