Created
February 19, 2015 20:25
-
-
Save nolanlawson/3bedd08dbc17c5c3bdf7 to your computer and use it in GitHub Desktop.
CouchDB in an Nginx reverse proxy
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
# this is the config I always use, to route http://mysite.com/couchdb to localhost:5984. | |
location /couchdb { | |
rewrite /couchdb(.*) $1 break; | |
proxy_pass http://127.0.0.1:5984; | |
proxy_redirect off; | |
proxy_buffering off; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
} |
@musamusa The following configuration works for CouchDB 2.x.x:
location ^~ /couchdb/ {
proxy_pass http://10.0.81.192:5984/;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this will not work for CouchDB 2.x.x