Need help accessing 2 Proxmox servers via domain name pls

husskii

Member
Jun 19, 2022
13
1
8
Hello I have installed 2 proxmox servers which i want to put together eventually having multiple nodes (i think a cluster not sure still learning)
my servers at the moment are pve.mydomain.com and pve2.mydomain.com i have set dns records for these as cname records pointing to my a record of mydomain.com.

this is a home environment so i have setup ddns on a vm via my 1st proxmox server which auto updates my dynamic ip, and then all my subdomains are cname pointing to my initial A record which hosts my domain name with my home ip.

I believe my host files are correct, pve.mydomain.com is 192.168.0.97 and pve2.mydomain.com is 192.168.0.198

my problem is for some reason it doesnt matter if i try pve or pve2 they both go to my 1st proxmox server and i am only able to access the 2nd server via its local ip.

is it possible to accomplish what i am trying to do (accessing 2 separate proxmox servers on subdomain same ip) and if so could someone please help and point me in the right direction.

Thanks
 
hi,


with your current setup your only chance would be opening different ports for the web GUI of the two servers, e.g.
mydomain.com:8080 -> 192.168.0.97:8006
mydomain.com:8081 -> 192.168.0.198:8006
though this way you will have to type the port number each time.


what you need is a reverse proxy in front of the servers which would redirect the http requests to the 1st or 2nd server based on the hostname (subdomain).
you could use for example nginx to accomplish that.

though if you will cluster your nodes eventually, be aware that you can manage pve2 from pve1 without logging into pve2 :)
 
  • Like
Reactions: husskii
hi,


with your current setup your only chance would be opening different ports for the web GUI of the two servers, e.g.
mydomain.com:8080 -> 192.168.0.97:8006
mydomain.com:8081 -> 192.168.0.198:8006
though this way you will have to type the port number each time.


what you need is a reverse proxy in front of the servers which would redirect the http requests to the 1st or 2nd server based on the hostname (subdomain).
you could use for example nginx to accomplish that.

though if you will cluster your nodes eventually, be aware that you can manage pve2 from pve1 without logging into pve2 :)
thanks i recently tried installing nginx proxy manager on a CT with a script but it seems to fail (internal error) when ever i tried to use ssl and with http and no ssl it worked but obviously i couldnt access the panel that way as https was not working. so now i plan to install npm myself on a vm without a script and hope that helps. as i later notices in logs there was an ssl error during the script install.

***Edit I did fix my router ports so now i am able to access each server by its subdomain (i really appreciate that idea) thank you :)

Also managed to get the cluster to work, there was a step that was missing in the video guide. i had to manually select the IP of current server from a drop down menu, after doing that and hitting refresh all worked well..

Thanks for help with sub domain :)
 
Last edited:
  • Like
Reactions: oguz

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!