Last active
April 14, 2020 19:54
-
-
Save bgautrea/b3bf2d7fd1b352c72b878a3f301458bf 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
server { | |
listen 8080; | |
access_log off; | |
location /api { | |
api; | |
} | |
location = /dashboard.html { | |
root /usr/share/nginx/html; | |
} | |
location / { | |
return 302 /dashboard.html; | |
} | |
} |
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 sd1 { | |
zone SD1 64k; | |
server 10.10.220.1:80; | |
server 10.10.220.2:80; | |
} | |
server { | |
listen 80; | |
server_name nginxdev.foo.com; | |
status_zone nginxdev.foo.com; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_http_version 1.1; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://sd1; | |
} | |
location /servicedesk { | |
proxy_set_header Host $host; | |
proxy_http_version 1.1; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://sd1/foo; | |
} | |
} |
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 sd1 { | |
zone SD1 64k; | |
server 10.10.220.1:80; | |
server 10.10.220.2:80; | |
} | |
upstream sd2 { | |
zone SD2 64k; | |
server sd2.foo.com; | |
} | |
server { | |
listen 80; | |
server_name nginxdev.foo.com; | |
status_zone nginxdev.foo.com; | |
location / { | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_http_version 1.1; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://sd1; | |
} | |
location /servicedesk { | |
proxy_set_header Host $host; | |
proxy_http_version 1.1; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_pass http://sd2; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment