Created
April 9, 2012 19:20
-
-
Save avsej/2345830 to your computer and use it in GitHub Desktop.
nginx config for thin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| upstream thin_cluster { | |
| server unix:/var/run/thin.0.sock; | |
| server unix:/var/run/thin.1.sock; | |
| server unix:/var/run/thin.2.sock; | |
| } | |
| server { | |
| server_name squish.demo.couchbase.com; | |
| root /home/couchbase/couchbase-squish/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_redirect off; | |
| if (-f $request_filename/index.html) { | |
| rewrite (.*) $1/index.html break; | |
| } | |
| if (-f $request_filename.html) { | |
| rewrite (.*) $1.html break; | |
| } | |
| if (!-f $request_filename) { | |
| proxy_pass http://thin_cluster; | |
| break; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment