diff options
author | Mark Longair <mhl@pobox.com> | 2013-10-31 16:52:35 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-11-07 12:46:25 +0000 |
commit | a81cb5c7693c6e8e623e9ab5b4d912340af699b0 (patch) | |
tree | 2bad5f58b878f65d4521b0aa593331bdd2c1c91d | |
parent | 0c2225e4215037deb063eb50222a8d55835175b4 (diff) |
Make X-Accel-Redirect work with the example nginx config
-rw-r--r-- | config/nginx.conf.example | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/config/nginx.conf.example b/config/nginx.conf.example index 9bec78f77..56e720abb 100644 --- a/config/nginx.conf.example +++ b/config/nginx.conf.example @@ -15,8 +15,15 @@ server { try_files $uri @ruby; } + location /download { + internal; + alias /var/www/alaveteli/alaveteli/cache/zips/development/download; + } + location @ruby { proxy_pass http://alaveteli; proxy_set_header Host $http_host; + proxy_set_header X-Sendfile-Type X-Accel-Redirect; + proxy_set_header X-Accel-Mapping /var/www/alaveteli/alaveteli/cache/zips/development/download=/download; } } |