-1

I have a server that has a docker container running on port 443 (registry), which I access by addressing https://registry.mywebsite.com. I want to also direct https://pages.mywebsite.com to that server, though port 443 is already used by the registry. How can I serve https://pages.mywebsite.com from that same server?

naraghi
  • 101
  • 1
  • 3

1 Answers1

0

Not at all. See, DNS does not care about ports (outside of some entries like SVR, which are NOT used for web). It maps domain names to IP addresses. No ports involved. And yes, HTTP is not using SRV records to start with.

But multiple websites on one port - even with HTTPS - is a solved problem for many years, so I suggest you... read the manual for your web server how to do that.

TomTom
  • 51,649
  • 7
  • 54
  • 136
  • If I was using nginx on port 443, I would know where to read up on this, but the problem is that I have a totally unrelated docker container listening on port 443. – naraghi Dec 09 '22 at 18:57
  • Nope, you then use a reverse proxy to distribute traffic. You can use Ngix to forward traffic for a domain from 443 to your container running on another - non internet open - port. – TomTom Dec 09 '22 at 19:06
  • Thanks a lot, I understand now. – naraghi Dec 09 '22 at 20:14