Source

django-fagungis / fagungis / conf / nginx_https.conf

# -*- 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/;
        }
}