From 5a96234cbc2b79ffdd7749c09b471ea7badebf65 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sat, 9 Nov 2013 21:17:52 +0100 Subject: [PATCH] update / improve sample configs --- docs/examples/bind9/named.conf | 4 +-- docs/examples/bind9/nsupdate.info-zonefile | 12 ++++---- docs/examples/nginx_gunicorn/nginx.conf | 33 ++++++---------------- 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/docs/examples/bind9/named.conf b/docs/examples/bind9/named.conf index f73c270..a84ee20 100644 --- a/docs/examples/bind9/named.conf +++ b/docs/examples/bind9/named.conf @@ -1,11 +1,11 @@ // configuration snippet for bind 9 nameserver (put it into /etc/bind9/named.conf ) key "nsupdate.info." { - // must be same algorithm as in the nsupdate/nsupdate/settings.py + // must be same algorithm as in the Domain record of the nsupdate.info based service algorithm hmac-sha512; // the secret is just a shared secret in base64-encoding, you don't need // to use a special tool to create it. Some random in base64 encoding should - // be OK. + // be OK. must be same secret as in the Domain record of the nsupdate.info based service secret "YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQ=="; }; diff --git a/docs/examples/bind9/nsupdate.info-zonefile b/docs/examples/bind9/nsupdate.info-zonefile index 189db3f..fc34717 100644 --- a/docs/examples/bind9/nsupdate.info-zonefile +++ b/docs/examples/bind9/nsupdate.info-zonefile @@ -9,12 +9,12 @@ nsupdate.info IN SOA ns1.thinkmo.de. root.thinkmo.de. ( ) NS ns1.thinkmo.de. NS ns3.thinkmo.de. - A 178.32.221.14 - AAAA 2001:41d0:8:e00e::1 + A 85.10.192.104 + AAAA 2a01:4f8:a0:2ffe:0:ff:fe00:8000 MX 10 mx.thinkmo.de. $ORIGIN nsupdate.info. $TTL 3600 ; 1 hour -www A 178.32.221.14 - AAAA 2001:41d0:8:e00e::1 -ipv4 A 178.32.221.14 -ipv6 AAAA 2001:41d0:8:e00e::1 +www A 85.10.192.104 + AAAA 2a01:4f8:a0:2ffe:0:ff:fe00:8000 +ipv4 A 85.10.192.104 +ipv6 AAAA 2a01:4f8:a0:2ffe:0:ff:fe00:8000 diff --git a/docs/examples/nginx_gunicorn/nginx.conf b/docs/examples/nginx_gunicorn/nginx.conf index c6a8449..e959cf4 100644 --- a/docs/examples/nginx_gunicorn/nginx.conf +++ b/docs/examples/nginx_gunicorn/nginx.conf @@ -4,46 +4,31 @@ upstream nsupdate_server { server { listen :80; - server_name nsupdate.info; - return 301 http://www.nsupdate.info$request_uri; + server_name www.nsupdate.info; + return 301 http://nsupdate.info$request_uri; } server { - listen :80; listen [::]:80; server_name nsupdate.info ipv4.nsupdate.info ipv6.nsupdate.info; - server_tokens off; - - client_max_body_size 4G; access_log /srv/nsupdate/logs/nginx-access.log; error_log /srv/nsupdate/logs/nginx-error.log; - location /favicon.png { - alias /srv/nsupdate/static/favicon.png; - } - - location /static/ { - alias /srv/nsupdate/static/; - } + root /srv/nsupdate/htdocs/; location / { + try_files $uri @nsupdate; + } + + location @nsupdate { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - # when doing https - # proxy_set_header X-Forwarded-Proto https; + proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $http_host; proxy_redirect off; - - if (!-f $request_filename) { - proxy_pass http://nsupdate_server; - break; - } + proxy_pass http://nsupdate_server; } - # Error pages error_page 500 502 503 504 /500.html; - location = /500.html { - root /srv/nsupdate/static/; - } }