aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/nginx.conf.example21
1 files changed, 9 insertions, 12 deletions
diff --git a/config/nginx.conf.example b/config/nginx.conf.example
index 251d9495d..4ecc0c0d8 100644
--- a/config/nginx.conf.example
+++ b/config/nginx.conf.example
@@ -3,20 +3,13 @@ upstream alaveteli {
}
server {
- listen 80;
-
- location / {
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header Host $http_host;
- proxy_set_header X-Forwarded-Proto http;
- proxy_redirect off;
- try_files $uri @ruby;
- }
+ listen 80 default;
+ server_name www.example.com;
root /srv/alaveteli;
server_tokens off;
+ try_files $uri/index.html $uri @alaveteli;
error_page 500 502 503 504 /500.html;
error_page 404 /404.html;
@@ -27,10 +20,14 @@ server {
alias /var/www/alaveteli/cache/zips/production/download;
}
- location @ruby {
- proxy_pass http://alaveteli;
+ location @alaveteli {
proxy_set_header Host $http_host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Sendfile-Type X-Accel-Redirect;
proxy_set_header X-Accel-Mapping /var/www/alaveteli/cache/zips/production/download=/download;
+ proxy_redirect off;
+ proxy_pass http://alaveteli;
}
}