How to map a subdomain to a specific port on the server?

How to map a subdomain to a specific port on the server?

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?

답변1

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.

관련 정보