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
JensDiemer 9169bf8f3d Project updates
"Apply" manually changes from https://github.com/YunoHost-Apps/django_example_ynh

* Add "safety check"
* Update to `django-yunohost-integration==0.4.0`
* `__FINAL_HOME_PATH__` -> `__FINALPATH__`
* `__FINAL_WWW_PATH__` -> `__PUBLIC_PATH__`
* Add `config_panel.toml` settings
2022-09-15 18:26:45 +02:00

28 lines
760 B
Nginx Configuration File

location __PATH__/static/ {
# Service static files by nginx
# e.g.: /var/www/$app/static
alias __PUBLIC_PATH__/static/;
expires 30d;
}
location __PATH__/ {
# https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf
# 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;
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__;
}