0

I'm not a pro with nginx. Please bear with me. I couldn't find a working how-to anywhere in the net. Only old stuff with nginx versions not able to pre-read anything. So this is my last resort, kind of.

I want to connect to some servers by http/https and ssh through nginx via subdomains from outside.

  • www.mydomain.com -> 192.168.1.1:443
  • ssh ssh2.mydomain.com -> 192.168.1.2:22
  • ssh ssh3.mydomain.com -> 192.168.1.3:22

The ssh ports can differ. No need to stick to 22. I think this must be possible with ssl_preread on and upstreams? How should the nginx configuration look like? Does the ssh command need anything to pre-send the subdomain name?

awado
  • 133
  • 1
  • 8

0 Answers0