If you don’t have the cash to buy a cPanel license and prefer some point-and-click server management opposed to strictly CLI, then Webmin is perfect for you. Webmin is open-source server management software that works on Ubuntu in any web browser.
If you’ve got your Ubuntu LAMP setup, DNS mapped to your server; then the next step is to start creating virtual hosts for Apache.
What is a virtual host?
By definition: The term Virtual Host refers to the practice of running more than one web site (such as www.company1.com and www.company2.com) on a single machine. Virtual hosts can be “IP-based”, meaning that you have a different IP address for every web site, or “name-based”, meaning that you have multiple names running on each IP address. The fact that they are running on the same physical server is not apparent to the end user.
In English: Imagine what a waste it would be if you could only host one (1) domain per server? With virtual servers, your rig can handled thousands of domains.
Step 1) Create your website’s directory
Go to Others –> File Manager
Navigate to public_html (or var/www/)Click on New and type the name of your website
Step 2) Set directory permissions
Select your folder, then click Info
Make sure the permissions are set to: 0755
Change the ownership and group to: www-data (www-data is the default user/group for Apache)
Apply changes to This directory and all sub-directories
Step 3) Create your virtual host
On the left menu under Servers, click Apache Webserver
Click Create virtual host
Enter your Document Root, and change the Server Name to match your domain
Click Create
Almost done!
You should be back at the Existing virtual hosts screen
Now click on your Virtual Server and then Networking and Addresses
Here you can set the Server admin email (optional) and the Alternate virtual server names
See how I put “www.” in front? If you don’t set an Alternate virtual server name with “www”, then anytime someone types “www.yourdomain.com” the site wont load!
Step 4) Apply Changes
This is important! :)
That’s it!
Wrap up
If your DNS is setup – and pointing at your server’s IP address…then you should see something like this:
It will look like that until you upload some HTML files.




















awsome!
Hi
can you go into more detail on your screen shot for Apache Webserver = create-virutal-servers-in-webmin-2.png
I have the most recent version 1.560 and when I am on that screen I do not have the option you show under Add virtual server to file. Specifically, I do not have an option for “New file under virtual servers directory”
I have 2 options:
Standard httpd.conf file
Selected file
Should there be a different httpd.conf file created for each virtual server? or is it ok to select Standard httpd.conf file for each virtual server created in webmin?
Thanks a very well explained and displayed tutorial got me up and running. I really appreciate it!
nice post…very helpful..thanks a lot…