-
-
Save mattdeboard/1c908296da8d654254f8 to your computer and use it in GitHub Desktop.
This file contains 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 nuxeo { | |
server nuxeo-00.example.com:8080; | |
server nuxeo-01.example.com:8080; | |
} | |
map $cookie_jsessionid $sticky_backend { | |
default nuxeo; | |
*.nxworker1 nuxeo-00.example.com:8080; | |
*.nxworker2 nuxeo-01.example.com:8080; | |
} | |
server { | |
listen 443 ssl; | |
server_name nuxeo-staging.example.com; | |
ssl_certificate /etc/ssl/certs/cl-wildcard-cert.chained.crt; | |
ssl_certificate_key /etc/ssl/certs/cl-wildcard-cert.key; | |
proxy_set_header Host $host; | |
proxy_set_header X-Forwarded-Proto $scheme; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
location ^~ / { | |
error_page 502 @rrfallback; | |
proxy_pass http://$sticky_backend; | |
} | |
location @rrfallback { | |
proxy_pass http://nuxeo; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment