1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pyinventory_ynh.git synced 2024-09-03 20:16:09 +02:00
pyinventory_ynh/conf/nginx.conf

38 lines
858 B
Nginx Configuration File
Raw Normal View History

2020-12-07 16:20:37 +01:00
2020-12-09 14:15:42 +01:00
location __PATH__/static/ {
2020-12-08 09:31:10 +01:00
# Django static files
2020-12-07 16:20:37 +01:00
alias __PUBLIC_PATH__/static/;
expires 30d;
}
# TODO: django-sendfile2:
#location __PATH__/media/ {
# # DATA_DIR/media/
# alias __PUBLIC_PATH__/media/;
# expires 30d;
#}
location / {
2020-12-08 09:31:10 +01:00
# https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf
2020-12-07 16:20:37 +01:00
# this is needed if you have file import via upload enabled
client_max_body_size 100M;
proxy_http_version 1.1;
proxy_set_header Host $host;
2020-12-08 09:31:10 +01:00
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2020-12-07 16:20:37 +01:00
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;
2020-12-08 09:31:10 +01:00
proxy_redirect off;
2020-12-07 16:20:37 +01:00
2020-12-08 09:31:10 +01:00
proxy_pass http://127.0.0.1:__PORT__/;
2020-12-07 16:20:37 +01:00
# Include SSOWAT user panel.
#include conf.d/yunohost_panel.conf.inc;
}