Add physical server with subdomain hostname to main server on same internal network

as the title suggests, i really need help with this.
so i have a domain on my server,, i need to add another physical server to it and i want to call it
They will both run on same internal network and only be accessible by one external IP.
please if you know how to do this, give me a step by step instructions, because i have tried everything and apparently its the Name Alias record that i need to add but im still not sure how to properly do that.
I would really appreciate anyone who knows how to do this.

I tried adding master record to main server BIND DNS it creates a slave zone but doesnt transfer records to it.

ok finally done it, added the cname records only one issue now, when i type it takes me to one of the websites hosted on main server. Is this something to do with apache setting now?

OS type and version ubuntu 20.04
Webmin version 1.994
Virtualmin version 7.1-1pro
Related packages SUGGESTED

OK, lets say that hypothetically, your first server has an internal address of, and your second one has an address of

On your first server, assuming it’s a Virtualmin installation because that’s the forum you’re on, create a new virtual server called, the only options you should need to turn on are Setup Apache Website and Setup Apache SSL Website. (but depending on how you’re handling your DNS hosting, and if you want to do something more than “website on second server” you may or may not need other options)

After the new server is created, select it from the dropdown list and click Server Configuration > Edit Proxy Website

Set proxying enabled to “Yes” and enter the IP address of (or whatever is the internal address of your second physical server.

Your second server will serve requests sent to it on, your first server will do “everything else”, and you only need one external IP.

Thank you for your reply.
ok i tried that, in edit proxy websites it wont let me enter ip, it says invalid url.

I added the subdomain in virtualmin, only apache and ssl option enabled, and its not working.

Here is what i am trying to do with the subdomain.
Using WHMCS i want to create virtual servers on a second server. Ive got cloudmin installed on main server. Do i need to create records in bind? Or will virtualmin/cloudmin do all the work. Do i need to have virtualmin installed on second server? Or cloudmin? DO i really need subdomain hostname? now that im thinking about it not really.
I hope you understand what im trying to accomplish.
Thank you

If you’re hosting DNS yourself, Virtualmin will “do all the work”, assuming it detect your external IP correctly, and you turn on the DNS options of Virtualmin.
(if you don’t have a static IP, you should not host DNS yourself, check if your domain registrar does it, most do, but if not, there’s free services to host DNS for you)

You don’t “need” the subdomain, it’s really up to you on how you manage things, your records could be
host1.domain… host2.domain… host3.domain…
instead of host1.domain… host1.server2.domain… etc

Also, if just the IP address didn’t work when setting the proxy, try

You have helped me so much, thank you!
You made it so easy to understand.
adding http:// worked
what i was trying to do is create mini server for my kids on raspberry pi 4 so they can learn, and you solved both of my issues.
Thanks again mate!

Hi, also when i try to add KVM instance i get this error, : sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
i added www-data to sudoers just to see if it will fix it and it didnt work, do you have any idea?

This doesn’t make sense.

is that all you got?

I thought this was already solved. I just wanted to point out that adding www-data to sudoers is not a sensible thing to do. It is potentially extremely dangerous, and also has no relation to anything in your question.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.