Created
August 4, 2022 07:16
-
-
Save mgmgpyaesonewin/a80051b7cd59e4c2de777e17f3814bd5 to your computer and use it in GitHub Desktop.
reverse proxy for multiple server nginx
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 preprod-apim-am.wavemoney.io { | |
server localhost:3000; | |
} | |
upstream preprod-apim-gw.wavemoney.io { | |
server localhost:4000; | |
} | |
server { | |
listen 80; | |
server_name preprod-apim-am.wavemoney.io; | |
location / { | |
proxy_pass http://preprod-apim-am.wavemoney.io; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} | |
server { | |
listen 80; | |
server_name preprod-apim-gw.wavemoney.io; | |
location / { | |
proxy_pass http://preprod-apim-gw.wavemoney.io; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment