mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
use try_files instead of if in the deploy example.
This commit is contained in:
parent
dbc61f310e
commit
5d6f6828f9
@ -53,14 +53,16 @@ An `example configuration`_ file for fast clients with Nginx_::
|
|||||||
root /path/to/app/current/public;
|
root /path/to/app/current/public;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
# checks for static file, if not found proxy to app
|
||||||
|
try_files $uri @proxy_to_app;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @proxy_to_app {
|
||||||
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;
|
||||||
|
|
||||||
if (!-f $request_filename) {
|
proxy_pass http://app_server;
|
||||||
proxy_pass http://app_server;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
error_page 500 502 503 504 /500.html;
|
error_page 500 502 503 504 /500.html;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user