summaryrefslogtreecommitdiff
path: root/install/nginx.conf.template
blob: cf28553a8e20aefe8cd0f5c63631a0c81ba6f552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
server {
    listen #NGINX_PORT#;
    server_name #URL#;
    root #INSTALL_PATH#;
    access_log /var/log/django/#APP_NAME#-access.log;
    error_log /var/log/django/#APP_NAME#-error.log;
    # if you change client_max_body_size do not forget to change it also
    # to your corresponding local_settings.py file
    client_max_body_size #MAX_UPLOAD_SIZE#M;

    location /static/ { # STATIC_URL
        alias #INSTALL_PATH#/#APP_NAME#/static/; # STATIC_ROOT
        expires 30d;
    }

    location /media/ { # MEDIA_URL
        alias #INSTALL_PATH#/#APP_NAME#/media/; # MEDIA_ROOT
        expires 30d;
    }

    location / {
        include uwsgi_params;
        uwsgi_pass 127.0.0.1:#UWSGI_PORT#;
        uwsgi_read_timeout 1800;
        uwsgi_send_timeout 600;
    }
}