From e45cd521f92f0f96da7e67aef6f885ed3251e901 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Wed, 22 Oct 2014 15:50:31 +0200 Subject: [PATCH] Add example nginx config. * nginx-config: New file. --- nginx-config | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 nginx-config diff --git a/nginx-config b/nginx-config new file mode 100644 index 0000000..311bb2e --- /dev/null +++ b/nginx-config @@ -0,0 +1,24 @@ +server { + listen 80 default_server; + listen [::]:80 default_server ipv6only=on; + + root /var/www/example.com; + index index.html; + + # Make site accessible from http://example.com/ + server_name example.com; + + location = / { proxy_pass http://127.0.0.1:8080/; } + location /archives { proxy_pass http://127.0.0.1:8080/archives; } + location /feed { proxy_pass http://127.0.0.1:8080/feed; } + location /search { proxy_pass http://127.0.0.1:8080/search; } + location /tags { proxy_pass http://127.0.0.1:8080/tags; } + location /debug { proxy_pass http://127.0.0.1:8080/debug; } + location /admin { proxy_pass http://127.0.0.1:8080/admin; } + + location / { + # First attempt to serve request as file, then + # as directory, then fall back to displaying a 404. + try_files $uri $uri/ =404; + } +}