use try_files instead of if in the deploy example.

This commit is contained in:
Neil Chintomby 2011-03-13 23:21:15 -04:00 committed by benoitc
parent dbc61f310e
commit 5d6f6828f9

View File

@ -53,14 +53,16 @@ An `example configuration`_ file for fast clients with Nginx_::
root /path/to/app/current/public;
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 Host $http_host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://app_server;
break;
}
proxy_pass http://app_server;
}
error_page 500 502 503 504 /500.html;