mirror of
https://github.com/YunoHost-Apps/django_example_ynh.git
synced 2024-09-03 18:26:21 +02:00
24 lines
614 B
Nginx Configuration File
24 lines
614 B
Nginx Configuration File
|
|
location __PATH__/static/ {
|
|
# Django static files
|
|
alias __PUBLIC_PATH__/static/;
|
|
expires 30d;
|
|
}
|
|
|
|
location / {
|
|
# https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf
|
|
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Protocol $scheme;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Scheme $scheme;
|
|
|
|
proxy_read_timeout 30;
|
|
proxy_send_timeout 30;
|
|
proxy_connect_timeout 30;
|
|
proxy_redirect off;
|
|
|
|
proxy_pass http://127.0.0.1:__PORT__/;
|
|
}
|