adding nginx.conf from production server to repo 185/head
authorSeth Woodworth <seth@sethish.com>
Wed, 4 Dec 2013 03:58:12 +0000 (22:58 -0500)
committerSeth Woodworth <seth@sethish.com>
Wed, 4 Dec 2013 03:58:12 +0000 (22:58 -0500)
confs/prod/nginx.conf [new file with mode: 0644]

diff --git a/confs/prod/nginx.conf b/confs/prod/nginx.conf
new file mode 100644 (file)
index 0000000..4c03843
--- /dev/null
@@ -0,0 +1,30 @@
+upstream django-beta    {
+    server         127.0.0.1:8000;
+}
+
+server {
+    server_name karmanotes.org ;
+    client_max_body_size 20M;
+
+    location /library/ {
+           alias /var/www/djkarma/;
+    }
+
+    location /static/ {
+       alias /var/www/static/;
+    }
+
+    location / {
+        proxy_pass         http://django-beta;
+        proxy_redirect     off;
+        proxy_set_header   Host             $host;
+        proxy_set_header   X-Real-IP        $remote_addr;
+        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
+    }
+
+
+}
+server {
+    server_name karmanotes.com www.karmanotes.com;
+    rewrite ^ http://karmanotes.org$request_uri? permanent;
+}