aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2011-05-07 18:36:07 +0000
committerbnewbold <bnewbold@robocracy.org>2011-05-07 18:36:07 +0000
commit8d0cfc4a8107adf6c5f64ad8d03a0a30c92cc4c2 (patch)
tree3dc2c10f2731139696e297d236dbd9080cae7498
parent6687120a3e0f0b7bfa148e93eb65bb2d2aa383d0 (diff)
downloadpiccast-8d0cfc4a8107adf6c5f64ad8d03a0a30c92cc4c2.tar.gz
piccast-8d0cfc4a8107adf6c5f64ad8d03a0a30c92cc4c2.zip
better nginx configuration
-rw-r--r--doc/nginx.conf21
1 files changed, 20 insertions, 1 deletions
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;
+}
+