Monday Sep 06
English French German Italian Portuguese Russian Spanish Filipino

Using Virtualmin GPL to create Name-based Virtual Hosts

Attention: open in a new window. PrintE-mail

I manage numerous web sites at work but since we only have very few public IP addresses given to us I decided to use Name based virtual hosting. This is how I did it with the help of Virtualmin GPL.

Disclaimer: There is no guarantee this will work for you. Created for author's personal use.

Note: I have our web server behind a firewall so I have firewall rules which forward traffic to port 80 into the DMZ. Before you even attempt to create your virtual host make sure your registered domain is already pointing to this server's IP address!

Let me first point out I am using the "Blue Framed Theme" to explain why my Webmin menu layout looks this way. So after connecting to Webmin go expand Servers menu then go to |Virtualmin Virtual Servers.

 

server-menu

 

Create a new Name-based Virtual host by clicking | Add new virtual server, owned by.  Enter the name of your registered domain name then make a selection as to what features you want enabled/disabled for this domain by merely unchecking the box. For the IP address and forwarding section I will leave the settings alone since the default settings already work for name based virtual hosting. But if you want to use IP based virtual hosting then you will have to add the IP address into the space after Virtual with IP. Once you're satisfied with the options selected click Create Server. If you decided to enter an IP address for the Virtual IP, Virtualmin will automatically add it in for you.

 

create-virtual-server

 

To manage your newly created virtual server go to Servers menu | Virtualmin Virtual Server (GPL). Click on the name of your newly created virtual server. As you can see it gives you an incredible amount of control.

 

edit-virtual-server

 

 

Now comes the part where you're ready to upload files to the newly created virtual host. You can use FTP, WinSCP,  or Webmin to upload your web site content. I use Webmin's upload/download module. Go to Others menu | Upload and Download | Upload to server | Choose the file to upload. The choose where to upload it in this case it would be the directory /home/example/public_html. Make sure it is the owner's name being used to upload the file. Otherwise you will get an error. Once you're satisfired with the settings click upload.

 

 

upload-download

 

Test the site by going to the url of your newly created virtual website. Since I don't have any content in it yet this is what I get.

 

forbidden

If you need to manage the Apache configuration files on your virtual web site go to Servers menu | Apache Webserver | click on the virtual website to manage. This will bring up the control panel to manage this particular name based virtual website. The amount of stuff you can do here is just truly amazing!

 

virtual-config

 

Now that you have gotten a taste of what the free version of Virtualmin GPL, could do. Check out this comparison chart. The pro version comes with automated install scripts of all popular Open Source projects.



Add this page to your favorite Social Bookmarking websites
Digg! Reddit! Del.icio.us! Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Portal

COMMENTS: (Abusing this comment form with spam would be the most effective way to have your IP, network or country blocked!)

avatar Geoff
0
 
 
If I could, I would like to thank you for this HOWTO.

I have recently got the system working and functional and was trying to follow swelljoe's admirable tutorials in this area that are on the webmin site.

But a system as sophisticated as this needs some practice; and your very clear demonstration helps in finding one's way around.

Thanks

Geoff
Name *
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment
Cancel
Name *
Code   
ChronoComments by Joomla Professional Solutions
Submit Comment