Subdomains and dns questions



  • I have a domain running a web server on port 80 and 443 I also have a subdomain that I would also like to run a web server on port 80 and 443 but my problem is that I only have one frontend.
    How can I do this?
    I have heard that I could use SRV DNS records or a proxy to do this.

    I am going to be running multiple web servers, FTP servers, SQL servers, etc all on the same ip.
    I have figured out all the others but the webservers which all need to be on port 80 and 443.



  • Do you actually need multiple servers? I stopped caring about ftp a long time ago, but surely you can run multiple websites and databases off of one server, respectively? Squid running as a reverse proxy can help with that.



  • @KOM each web server does different things they can't all be put on the same system as I have tried and they all just end up erroring out. Could you explain how to set up squid as a reverse proxy?



  • I've never used it so no, I can't really explain how to install & configure it. I was just giving you a suggestion.


  • Netgate Administrator

    Yeah you should be able to use either HAProxy or reverse Squid to redirect requests based on the host headers to different internal servers. Or different ports on the same server.

    https://docs.netgate.com/pfsense/en/latest/packages/haproxy-package.html

    Youtube Video

    Steve