Created
October 12, 2022 07:09
-
-
Save dev-gwang/346b7e418a959cb15326ce943a2a9dd2 to your computer and use it in GitHub Desktop.
How to set up ssh proxy with Nginx (multiple domain)
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
## Nginx Version > v1.9.2 | |
stream { | |
upstream ssh2 { | |
server localhost:2204; | |
} | |
upstream ssh { | |
server localhost:2203; | |
} | |
map $server_addr $map_ssh_domain { | |
a.test.com ssh2; | |
b.test.com ssh; | |
} | |
server { | |
listen 443; | |
proxy_pass $map_ssh_domain; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment