deploy/templates/nginx.static.conf.j2
changeset 184 aac6db7cea99
parent 180 62bffc051e1c
child 186 3458941945e0
equal deleted inserted replaced
183:f8f3af9e5c83 184:aac6db7cea99
    28     location {{backend_url}}/auth {
    28     location {{backend_url}}/auth {
    29         uwsgi_pass  {{backend_upstream_name}};
    29         uwsgi_pass  {{backend_upstream_name}};
    30         include /etc/nginx/uwsgi_params;
    30         include /etc/nginx/uwsgi_params;
    31     }
    31     }
    32 
    32 
    33     location /backend/static {
    33     location {{'/' if static_url_base=='' else static_url_base}}backend/static {
    34         alias {{backend_nginx_static_root}}; # backend static files
    34         alias {{backend_nginx_static_root}}; # backend static files
    35     }
    35     }
    36 
    36 
    37     location /backend/media {
    37     location {{'/' if static_url_base=='' else static_url_base}}backend/media {
    38         alias {{backend_nginx_media_root}};  # backend media files
    38         alias {{backend_nginx_media_root}};  # backend media files
    39     }
    39     }
    40 
    40 
    41     location / {
    41     location {{'/' if static_url_base=='' else static_url_base}} {
    42         # First attempt to serve request as file, then
    42         # First attempt to serve request as file, then
    43         # as directory, then fall back to displaying a 404.
    43         # as directory, then fall back to displaying a 404.
    44         try_files $uri $uri/ /index.html;
    44         try_files $uri $uri/ /index.html;
    45     }
    45     }
    46 }
    46 }