Score:0

Set up nginx to proxy web and ssh by domain?

us flag

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?

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.