mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Safer nginx config (issue #404).
This commit is contained in:
parent
d28366a683
commit
d19d34d1b8
@ -67,15 +67,13 @@ http {
|
|||||||
|
|
||||||
keepalive_timeout 5;
|
keepalive_timeout 5;
|
||||||
|
|
||||||
# path for static files
|
|
||||||
root /path/to/app/current/public;
|
|
||||||
|
|
||||||
location / {
|
location ^~ /static {
|
||||||
# checks for static file, if not found proxy to app
|
# path for static files
|
||||||
try_files $uri @proxy_to_app;
|
alias /path/to/app/current/public/static;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @proxy_to_app {
|
location / {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header Host $http_host;
|
proxy_set_header Host $http_host;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user