Skip to content

Instantly share code, notes, and snippets.

@dev-gwang
Created October 12, 2022 07:09
Show Gist options
  • Save dev-gwang/346b7e418a959cb15326ce943a2a9dd2 to your computer and use it in GitHub Desktop.
Save dev-gwang/346b7e418a959cb15326ce943a2a9dd2 to your computer and use it in GitHub Desktop.
How to set up ssh proxy with Nginx (multiple domain)
## 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