diff --git a/doc/site/deploy.rst b/doc/site/deploy.rst index a90334b3..b95ef600 100644 --- a/doc/site/deploy.rst +++ b/doc/site/deploy.rst @@ -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;