Virtual Servers on shared ip

Hi, i’ve installed virtual min in a virtual box, with cent os 5.4, its up and running but i’m trying to figure out how do you set up multiple ‘virtual servers’ on the same shared ip, like how cpanel hosting providers do.

What should i google to get documentation on this?

Thanks in advance.


That should actually work out of the box… simply create multiple Virtual Servers (ie, domains), and they should all be accessible even though they’re on the same IP address.

If that’s not working for some reason, let us know what you’re trying to setup, and what symptoms you’re seeing.


After the installation i logged into virtualmin and created two new virtual servers: server1, server2 as the the domain name, and a password then i try to access them via the local address tied to the server hostname eg.

When i enter on my network i only get server1 but how do i access server2?

The problem you’re running into is one of DNS resolution – and it’ll get even more complex running your server behind a NAT router :slight_smile:

Are you looking to make those domain names available both internally on your LAN, as well as externally from the internet?

Or do they only need to be available on the LAN?

Essentially though, what you’ll need to do is make it so that the systems in question are either using your server’s DNS when resolving domain names, or you need to add the domain names you have hosted on your server to your desktop’s hosts or lmhosts file so that they don’t need to perform DNS lookups.


The reason i’m doing this is because i want to purchase a vps, and i wanna learn how to setup these type of things.

Persons can connect to virtualmin via the web right now because i have added a dmz host to my cable modem (paradyne 6211-I2) which is the static ip for the virtual machine, and they connect via the external ip address.

I’m more trying to figure out how to setup the multiple shared ip virtual servers on the LAN, so i can replicate it when i get a vps.

When you say domain names, you mean actual domain names or the virtual servers created in virtualmin ? As this is a test environment i’m not using actually domain names, do i have to use real ones?

The dns on the virtual machine is
Primary:, Secondary

Primary Gateway:

Static ip:

This is what i set up on the eth0 interface of the unix distro (cent os 5.4)

I’m not sure how i would edit the system dns to fix this issue, is there somewhere i can go to get information on stuff like this?

I’ve read a couple places that i have to edit apache ‘conf’ Virtual Server Details and set it to any, will that solve my problem?