I have a server running a full Virtualmin install with Apache, in a LAN behind NAT.
All ports needed are mapped by the router (bridge is not allowed). DNS and Letsencrypt are working.
Now I need to add some more servers, each with a subdomain, in the same LAN, but not on the node with Virtualmin.
How do I tell Virtualmin (Apache) to create a new sub-server with a new subdomain on another server with a different LAN IP, just to redirect/forward at least all traffic to ports 80 and 443?
Can this be done by “Create Virtual Server - Sub-server” and then modifying it’s settings??
@jhort hi, basically yes… you have few options… for example I have setup like you want in my home… my main server with virtualmin takes care about domains, dns etc… the second server runs virtualmin too but with its normally behind nat sits on lan and no ports are open. I run git web access to my repositories there. However I am passing that website via subdomain on my real server… it calls proxy… its under domain/subdomain settings. just create subdomain for your another server then modify proxy settings and point to your lan only server. That will work easy peasy.
If you need to use ssl on subdomain but not need it for lan-only server then there is a bit work around - I use lets encrypt for that but the whole process is not that complicated. You can add as many lan-based other servers as you wish by that way.
I can help you with that, I am free to hire any time and will produce documentation for you if need it.
Thanks @unborn, first of all I think that the real problem here is, that my isp doesn’t allow bridging the external ip through the router to my server. So first there is always NAT included already and redirecting has to be done to an internal ip. Some apps like Nextcloud (production) or Jitsi get serious problems here already. One solution I am thinking about is to put a Nginx in font of Virtualmin, as it is capable to forward the real ip and redirect not only HTTP but also UDP stream - but I don’t get the real ip as it’s already NAT and I would have to “double nat” - quite crazy^^
So my conclusion is to change to an isp that allows bridging and then to put nginx in front of Virtualmin.
Except somebody knows a better way? :))
You don’t. Virtualmin operates on the server it runs on. It does not setup sites on other servers…just install Virtualmin on the other server, too.
You can outsource DNS to another server. You can outsource databases to another server. You can outsource ClamAV/Spam scanning to another server. All require a few minutes of initial configuration. But, Virtualmin only sets up websites on the server it runs on.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.