1. Denis Darii
  2. django-fagungis

Commits

Denis Darii  committed da7811a

added https configuration for nginx

  • Participants
  • Parent commits 3c8060b
  • Branches default

Comments (0)

Files changed (1)

File fagungis/conf/nginx_https.conf

View file
  • Ignore whitespace
+# -*- mode: nginx; mode: flyspell-prog; mode: autopair; ispell-local-dictionary: "american" -*-
+### Nginx configuration for %(nginx_server_name)s
+
+server {
+    server_name %(nginx_server_name)s;
+    rewrite ^(.*) https://%(nginx_server_name)s$request_uri? permanent;
+}
+
+server {
+        listen 443;
+
+        server_name     %(nginx_server_name)s;
+
+        ssl on;
+
+        location = /favicon.ico  {
+                root %(django_static_path)s/img;
+        }
+
+        location / {
+                client_max_body_size %(nginx_client_max_body_size)iM;
+                proxy_pass   http://%(gunicorn_bind)s;
+        }
+
+        location %(django_media_url)s
+        {
+                root %(django_media_root)s/;
+        }
+
+        location %(django_static_url)s
+        {
+                root %(django_static_root)s/;
+        }
+}