Skip to content
Browse files

* Now using separate sockets for IPv6 and IPv4.

  • Loading branch information...
1 parent f23120f commit 77c7803f95474d75f6f7ecd06594343250665736 @perusio committed Mar 17, 2012
Showing with 13 additions and 3 deletions.
  1. +9 −1 README.md
  2. 0 sites-available/{default → 000-default}
  3. +4 −2 sites-available/example.com.conf
View
10 README.md
@@ -101,7 +101,15 @@
this provides some benefits over using only Apache, since Nginx is
much faster than Apache. Furthermore you can use the proxy cache
and/or use Nginx as a load balancer.
-
+
+## IPv6 and IPv4
+
+The configuration of the example vhosts uses **separate** sockets for
+IPv6 and IPv4. This way is simpler for those not (yet) having IPv6
+support to disabli it by commenting out the
+[`listen`](http://nginx.org/en/docs/http/ngx_http_core_module.html#listen)
+directive relative to IPv6.
+
## Installation
1. Move the old `/etc/nginx` directory to `/etc/nginx.old`.
View
0 sites-available/default → sites-available/000-default
File renamed without changes.
View
6 sites-available/example.com.conf
@@ -4,14 +4,16 @@
server {
## This is to avoid the spurious if for sub-domain name
## "rewriting".
- listen [::]:80;
+ listen 80;
+ listen [::]:80 ipv6only=on;
server_name www.example.com;
return 301 $scheme://example.com$request_uri;
} # server domain rewrite.
server {
- listen [::]:80;
+ listen 80;
+ listen [::]:80 ipv6only=on;
limit_conn arbeit 32;
server_name example.com;

0 comments on commit 77c7803

Please sign in to comment.
Something went wrong with that request. Please try again.