Skip to content

Instantly share code, notes, and snippets.

@domachine
Created November 2, 2015 13:03
Show Gist options
  • Select an option

  • Save domachine/a8a814c4dd5ff22231fc to your computer and use it in GitHub Desktop.

Select an option

Save domachine/a8a814c4dd5ff22231fc to your computer and use it in GitHub Desktop.
Couchapp nodejs nginx configuration
server { # simple reverse-proxy
server_name _;
listen 80 default_server;
location / {
proxy_pass http://app:5984;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ ^/(app\.(js|css)|[^/]+\.(jpg|png|gif))?$ {
rewrite /(.*) /_app/$1 break;
proxy_pass http://app:5984;
proxy_redirect 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