Multiple web servers same port

SuperMiguel

Active Member
Mar 30, 2010
30
0
26
So i have a proxmox setup with multiple webservers containers having different data, i will like to access them with subdomains, for example server1.example.com should point to 192.168.1.10:80 and server2.example.com should point to 192.168.1.11:80, what's the best way of doing? Im pretty sure it can be done with a 3rd vm running something like nginx and running reverse proxy, but just looking for opinions on whats the best way?
 
Hi,

normally you do this with a dns server.
 
Not sure if dns helps, as both server1.example.com and server2.example.com have to resolve to the same public IP proxmox is using. And iptables-routing is done using protocol/port/ip, not fqdn.

In this case I think the easiest and most reliable solution is to use reverse proxy (nginx, varnish, etc). This can then route traffic to multiple back-end web servers based on hostname in requests...
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!