From d19d34d1b8544b1784d26fc4f7fcdf17feaa5120 Mon Sep 17 00:00:00 2001 From: aartur Date: Fri, 21 Sep 2012 12:15:17 +0200 Subject: [PATCH] Safer nginx config (issue #404). --- doc/htdocs/deploy.html | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/doc/htdocs/deploy.html b/doc/htdocs/deploy.html index 88108286..85ef8335 100644 --- a/doc/htdocs/deploy.html +++ b/doc/htdocs/deploy.html @@ -67,15 +67,13 @@ http { keepalive_timeout 5; - # path for static files - root /path/to/app/current/public; - location / { - # checks for static file, if not found proxy to app - try_files $uri @proxy_to_app; + location ^~ /static { + # path for static files + 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 Host $http_host; proxy_redirect off;