Port forwarding multiple vms same application different domains
-
I have 4 Nextcloud virtual appliances on Proxmox.
IP's are 192.168.1.40-43. They are configured in public DNS to be (for example)
nxcloud1.example.com >> 219.15.24.X
nxcloud2.example1.com >> 219.15.24.X
nxcloud3.example2.com >> 219.15.24.X
nxcloud4.example3.com >> 219.15.24.XpfSense is setup in another vm and has a wan public IP which is configured in DNS for all the Nextcloud vm's. as above.
I am trying to access nxcloud1.example.com from the internet so that it goes to 192.168.1.40 and so on and so forth.
What is my best way to do this? DO I redirect WAN port 80/443 to say LAN port 80/443
Or is it better to redirect WAN port 8083 to LAN port 80/443
I was able to set both LAN/WAN to 8083 but https would not work so assume ACME was also not working to certificates were created.
Any simpler way would be fantastic as I'm very new at this.
Will HAproxy added make this harder or easier?
-
@bossey1 said in Port forwarding multiple vms same application different domains:
Will HAproxy added make this harder or easier?
Unless you have multiple IPs there where you have X, if you did I would of assumed .X and .Y and .Y etc. given vs all .X
If you have the same public IP and you want to hit different private IPs based on the domain, really only way to do it is with HAproxy.
If you only have 1 public IP being used, you have to do other ports to get forwarded to different lan side IPs. If not using a reverse proxy.
But with HAproxy you can look at the fqdn trying to go to, and direct that to different backend devices.