Hello all!
Got my first Proxmox host running and am now planning to create three separate web servers; one will serve a homepage, second will run Nextcloud and the third will run a picture gallery.
Previously I've used my router's forwarding rules to route all web traffic to a single server running the homepage, Nextcloud and picture gallery as virtual hosts.
This was kind of a PITA for various reasons, and I now want to separate these three services to three separate guests.
I also have a domain name registered:
https://adrianvg.com --> homepage virtual host
https://adrianvg.com/nextcloud --> Nextcloud virtual host
https://adrianvg.com/gallery --> gallery virtual host
What I've read on the web is to use a different port for each of the servers, like eg here; https://forum.proxmox.com/threads/multiple-vps-behind-one-public-ip.1681/post-9177.
10.10.10.3:10991 nextcloud
10.10.10.4:10992 homepage
10.10.10.5:10993 gallery
And this is where my problem starts.
How do I distinguish what calls to eg port 10991 should go to nextcloud when all incoming calls originate from port 443?
Incoming calls would be something like this:
Is there a better way to do this on the Proxmox host instead?
Maybe port forward all external incoming calls to port 443 to the Proxmox host, which would run apache, which would redirect https://adrianvg.com/nextcloud to 10.10.10.3:10991? All incoming to https://adrianvg.com/ to 10.10.10.4:10992 and so on?
When using apache as a redirecter, if at all possible, maybe I won't need different ports?
I can't quite wrap myself around how to set this up. What's the common way to set this up? What's easiest?
Hints and suggestions are greatly appreciated!
Thanks in advance.
My general network layout can be seen in https://forum.proxmox.com/threads/m...ss-proxmox-guests-from-lan.66733/#post-299871.
My current proxmox host /etc/network/interfaces/:
root@dragonborn:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eno1
#"real" ip address on skynet-tng.internal
iface eno1 inet static
address 192.168.0.9
netmask 255.255.255.0
gateway 192.168.0.1
iface eno2 inet manual
iface eno3 inet manual
iface eno4 inet manual
auto vmbr0
#private sub network
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
//AvG
Got my first Proxmox host running and am now planning to create three separate web servers; one will serve a homepage, second will run Nextcloud and the third will run a picture gallery.
Previously I've used my router's forwarding rules to route all web traffic to a single server running the homepage, Nextcloud and picture gallery as virtual hosts.
This was kind of a PITA for various reasons, and I now want to separate these three services to three separate guests.
I also have a domain name registered:
https://adrianvg.com --> homepage virtual host
https://adrianvg.com/nextcloud --> Nextcloud virtual host
https://adrianvg.com/gallery --> gallery virtual host
What I've read on the web is to use a different port for each of the servers, like eg here; https://forum.proxmox.com/threads/multiple-vps-behind-one-public-ip.1681/post-9177.
10.10.10.3:10991 nextcloud
10.10.10.4:10992 homepage
10.10.10.5:10993 gallery
And this is where my problem starts.
How do I distinguish what calls to eg port 10991 should go to nextcloud when all incoming calls originate from port 443?
Incoming calls would be something like this:
Service name | Source IP | Port range | Local IP | Local port | Protocol |
https | *.*.*.* | 443 | 10.10.10.3 | 10991 | TCP |
https | *.*.*.* | 443 | 10.10.10.4 | 10992 | TCP |
https | *.*.*.* | 443 | 10.10.10.5 | 10993 | TCP |
Is there a better way to do this on the Proxmox host instead?
Maybe port forward all external incoming calls to port 443 to the Proxmox host, which would run apache, which would redirect https://adrianvg.com/nextcloud to 10.10.10.3:10991? All incoming to https://adrianvg.com/ to 10.10.10.4:10992 and so on?
When using apache as a redirecter, if at all possible, maybe I won't need different ports?
I can't quite wrap myself around how to set this up. What's the common way to set this up? What's easiest?
Hints and suggestions are greatly appreciated!
Thanks in advance.
My general network layout can be seen in https://forum.proxmox.com/threads/m...ss-proxmox-guests-from-lan.66733/#post-299871.
My current proxmox host /etc/network/interfaces/:
root@dragonborn:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eno1
#"real" ip address on skynet-tng.internal
iface eno1 inet static
address 192.168.0.9
netmask 255.255.255.0
gateway 192.168.0.1
iface eno2 inet manual
iface eno3 inet manual
iface eno4 inet manual
auto vmbr0
#private sub network
iface vmbr0 inet static
address 10.10.10.1
netmask 255.255.255.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eno1 -j MASQUERADE
//AvG
Last edited: