summaryrefslogtreecommitdiff
path: root/install/nginx.conf.template
blob: 8df09e859a4fa669f15d255a4af9e9dcdf6d78bf (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
29
30
31
32
33
34
server {
    listen #NGINX_PORT#;
    server_name #URL#;
    root #INSTALL_PREFIX#/#DB_NAME#/ishtar/;
    access_log /var/log/django/#APP_NAME#-access.log;
    error_log /var/log/django/#APP_NAME#-error.log;
    client_max_body_size 20M;

    location /static-#DATE#/ { # STATIC_URL
        alias #INSTALL_PREFIX#/#DB_NAME#/ishtar/#APP_NAME#/static/; # STATIC_ROOT
        expires 30d;
    }

    location /media/ { # MEDIA_URL
        alias #INSTALL_PREFIX#/#DB_NAME#/ishtar/#APP_NAME#/media/; # MEDIA_ROOT
        expires 30d;
    }

    location /tinymce/ {
        alias /usr/share/tinymce/www/;
        expires 30d;
    }

    location /javascript/ {
        alias /usr/share/javascript/;
        expires 30d;
    }

    location / {
        include uwsgi_params;
        uwsgi_pass 127.0.0.1:#UWSGI_PORT#;
    }
}