Created
November 2, 2015 13:03
-
-
Save domachine/a8a814c4dd5ff22231fc to your computer and use it in GitHub Desktop.
Couchapp nodejs nginx configuration
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
| 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