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 your server’s public 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.
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 choice about what features you want enabled/disabled for this domain by merely un-checking 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.
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.
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 satisfied with the settings click upload.
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.
If you need to manage the Apache configuration files on your virtual web site go to Servers menu | Apache Web server | 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!
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.