Multiple webservers with different ports

Hi there,

I’ve got a problem with setting up dns for my domain. I have 2 domains and for those I have 2 webservers, the problem is that those servers share same public ip address. One server is listening on ports 80 and 443, the second one on ports 2052 and 2053 (all ports are supported by Cloudflare). I have connected the first server to my domain flawlessly, just because those ports are default. For my second server I am unable to point to specific port in DNS setting. Tried adding SRV record that was pointing to this specific port, but still received error.
Right now I’m stuck and can’t find any solution.

Thanks an advance for any ideas how to make it to work.

DNS does not do ports. You need to add the port to the URL to get it to connect.

1 Like

Thanks for reply.
Yes, by adding manually port to the url I can access the website, but is there any way, how to automate this process? My customers won’t be adding it manually and while requesting ssl certificate, certbot will also go with the default port 80.

You can run a proxy server on your server, like nginx or apache. This will allow you to have both websites served over 443.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.