Commits

theoden  committed fa67eb0

This file should be added at previous commit, but MQ cannot attach files
to patch.

  • Participants
  • Parent commits ebdb70b
  • Branches uwsgi

Comments (0)

Files changed (1)

File fab_deploy_tests/test_project/config_templates/nginx_uwsgi.config

+server {
+    listen 80;
+    server_name {{ SERVER_NAME }} www.{{ SERVER_NAME }};
+    access_log /var/log/nginx/{{ SERVER_NAME }}.access.log;
+    charset utf-8;
+    client_max_body_size 8m;
+
+    gzip_types text/plain text/xml text/css application/javascript application/x-javascript application/json;
+
+    location / {
+      include uwsgi_params;
+      uwsgi_param UWSGI_FASTROUTER_KEY $host;
+      uwsgi_pass 127.0.0.1:1336;
+   } 
+
+    # change /static to your static folder name
+    location /static {
+        root {{ PROJECT_DIR }};
+        autoindex off;
+        expires 1M;
+    }
+
+    # admin media serving
+    # (this location is available if django is installed from svn)
+    location /media {
+        root {{ ENV_DIR }}/src/django/django/contrib/admin;
+        expires 10m;
+        autoindex off;
+    }
+
+    # alternative django admin media path
+#    location /static/admin {
+#        root {{ PROJECT_DIR }};
+#        autoindex off;
+#        expires 10m;
+#    }
+
+    #error_page  404  /404.html;
+
+    # redirect server error pages to the static page /50x.html
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   /var/www/nginx-default;
+    }
+}