django 848 Bytes
Newer Older
guglielmo's avatar
guglielmo committed
1 2 3
server {

    listen 80;
4
    server_name localhost staging.verificafonti.openpolis.it verificafonti.openpolis.it;
guglielmo's avatar
guglielmo committed
5 6
    charset utf-8;

7
    client_max_body_size 16M;
guglielmo's avatar
guglielmo committed
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35

    location /static {
        alias /app/public/static;
    }
    
    location /media {
        alias /app/public/media;
    }

    location /data {
        alias /app/data;
    }

    location / {
        uwsgi_read_timeout          600;
        proxy_read_timeout          300;
        proxy_connect_timeout       300;
        proxy_redirect              off;

        proxy_set_header            Host              $http_host;
        proxy_set_header            X-Real-IP         $remote_addr;
        proxy_set_header            X-Forwarded-Proto $scheme;

        uwsgi_pass                  web:8000;
        include                     /etc/nginx/uwsgi_params;
    }
    
}