aboutsummaryrefslogtreecommitdiffstats
path: root/config/nginx.conf.example
diff options
context:
space:
mode:
Diffstat (limited to 'config/nginx.conf.example')
-rw-r--r--config/nginx.conf.example29
1 files changed, 29 insertions, 0 deletions
diff --git a/config/nginx.conf.example b/config/nginx.conf.example
new file mode 100644
index 000000000..56e720abb
--- /dev/null
+++ b/config/nginx.conf.example
@@ -0,0 +1,29 @@
+upstream alaveteli {
+ server 127.0.0.1:3300;
+}
+
+server {
+ listen 80;
+ root /var/www/alaveteli/alaveteli/public;
+
+ 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;
+ }
+
+ 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;
+ }
+}