diff options
author | Mark Longair <mhl@pobox.com> | 2013-10-29 12:18:52 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-10-29 13:44:59 +0000 |
commit | 20be3ca29859d7566cf5f5dfc012aa8a5f02492b (patch) | |
tree | 277f763534340c26157a66b0376a4b786aed391f | |
parent | 64ecff2c3d528c3f02d2cb936e5b6f81bbfa4f1a (diff) |
Add an example nginx.conf
This example nginx.conf file may be helpful for running
Alaveteli behind nginx - we have tested this with Thin
as the upstream server.
-rw-r--r-- | config/nginx.conf.example | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/config/nginx.conf.example b/config/nginx.conf.example new file mode 100644 index 000000000..158864aa5 --- /dev/null +++ b/config/nginx.conf.example @@ -0,0 +1,22 @@ +upstream alaveteli { + server 127.0.0.1:3300; +} + +server { + listen 80; + root /var/www/alaveteli; + + 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 @ruby { + proxy_pass http://alaveteli; + proxy_set_header Host $http_host; + } +} |