Home arrow Site Administration arrow Page 4 - One-Stop Linux Administration with Webmin

Adding A Virtual IP and Domain - Administration

If you're like me, you love Linux but the learning curve is a real killer. I remember it seemed to take forever to setup Apache the way I wanted, and I don't even want to mention how long it took me to figure out MySQL and Samba. To make a long story short, if you want to use all the features you can but don't have time or don't like the command line method (you still should learn it though!), Webmin is the way to go.

  1. One-Stop Linux Administration with Webmin
  2. Installing Webmin
  3. Basic Security
  4. Adding A Virtual IP and Domain
By: Dev Shed
Rating: starstarstarstarstar / 7
April 06, 2000

print this article


Binding an IP address to your NIC card, then getting Apache to use it for a virtual domain can be a pretty big headache. Lets run through this process with Webmin and you'll see what a breeze it is.

Binding a additional IP to your NIC

The first thing that needs to be done is to add the additional IP address(es) to your NIC. First log into Webmin then click on the 'Hardware' tab, next 'Network Configuration', then 'Network Interfaces.' Under Network Interfaces, you'll see two sections: 'Interfaces Active Now' and 'Interfaces Active at boot time.' Interfaces Active Now is/are the IP addresses that are currently active. You can add an IP address to this section, but it won't be active if you reboot, so you'll want to add the IP to the Activated at Boot Time area. This binds the IP address every time your machine boots. Now click on 'Add a new interface' under the Activated at Boot Time area. Here you'll see some information you need to fill in.

  • Name - Your main IP address is probably eth0. To add additional ones that need to go in this sequence eth0:1, then eth0:2, etc. So if you haven't added an addition IP address before type in eth0:1
  • IP address - This is the additional IP address that you're going to bind to your NIC.
  • Netmask - This will be the same as your other IP address(es). Usually it's
  • Broadcast - If you don't know this one (I didn't when I first did this) go back one screen and copy the same thing down you have on eth0.

After you fill in all of the information, click 'Save' and it will take you back to the Network Interfaces screen. Your IP address has now been added so it will bind when you start up. Assuming you want it activated right now, click on eth0:1 (the one you just added) and click "Save and Apply." This will activate the IP address and you should now see it in the Interfaces Active Now section.

Adding a Virtual Domain in Apache

This is really not difficult, so I'll just list the steps then give a couple of explanations. First make sure you're logged into Webmin, next click on the 'Server' tab, then 'Apache.' The first time you click on Apache it will ask you to re-configure know modules. It will list all of the modules in the httpd.conf file and have certain ones selected. Unless you know what you're doing with this area just leave it alone and click 'Configure.' It won't pull this screen up again unless you re-load Webmin.

You should now see the main Apache screen. Down at the bottom there's an option that says 'Create a New Virtual Server.' Just above that, you'll see the virtual servers you already have (if any).
Now lets fill in your virtual server (also know as virtual domain) information.

  • Address - This is the IP address you want your virtual domain to use. It should be the one you just added in the previous section.
  • Port - By default, your browser uses port 80, unless you're doing something a little funky, just leave the default button checked.
  • Document Root - This is where Apache will look for the web documents. You can type it in or click the button off to the right to browse your system.
  • Server Name - You can leave this on automatic, or you can type something like mydomain.com off to the right. Keep in mind your Domain Name Server (DNS) determines what domain name is attached to your IP address, not this section.
After you've filled in all of the information, click the 'Create' button. This will add the information to the httpd.conf file. To activate the changes you've made, click the 'Apply Changes' button on the top right of the screen.

Now if everything is setup right, you should be able to see your page through your web browser (assuming you've already registered the domain name and have DNS setup correctly). Have fun and don't tell too many people about Webmin. We don't want people thinking Linux is easy. :)

Webmin Links Home Page- <http://www.webmin.com/>
Standard Modules- <http://www.webmin.com/webmin/standard.html>
Third Party Modules- <http://www.webmin.com/webmin/third.html>

>>> More Site Administration Articles          >>> More By Dev Shed

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates


Dev Shed Tutorial Topics: