From 8d0cfc4a8107adf6c5f64ad8d03a0a30c92cc4c2 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Sat, 7 May 2011 18:36:07 +0000 Subject: better nginx configuration --- doc/nginx.conf | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/nginx.conf b/doc/nginx.conf index f89a75f..cbf036c 100644 --- a/doc/nginx.conf +++ b/doc/nginx.conf @@ -2,7 +2,7 @@ server { listen 80; listen [::]:80; - server_name piccast.memeschemes.com piccastapp.com www.piccastapp.com; + server_name piccastapp.com www.piccastapp.com; access_log /var/log/nginx/piccast_access.log; error_log /var/log/nginx/piccast_error.log; @@ -16,6 +16,11 @@ server { gzip_disable "MSIE [1-6]\."; gzip_disable "wget"; + location = / { + root /srv/http/piccastapp.com/www; + index index.html index.htm frontpage.html; + } + location / { # Fallthrough to django if file not found fastcgi_param PATH_INFO $fastcgi_script_name; @@ -38,3 +43,17 @@ server { } } +server { + listen 80; + listen [::]:80; + server_name piccast.memeschemes.com; + + access_log /var/log/nginx/piccast_access.log; + error_log /var/log/nginx/piccast_error.log; + + root /srv/http/piccastapp.com/www; + index index.html index.htm; + + rewrite ^(.*)$ http://piccastapp.com$1 permanent; +} + -- cgit v1.2.3