Genius is nothing but great effort applied. – Awa Kenzo

How To: Create Virtual Servers For Apache Using Webmin

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.

Greg Rickaby runs on the Genesis Framework

Genesis Framework

The theme you're viewing is the eleven40 Child Theme, which was built on Genesis.

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using Genesis now!

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.

Comments

  1. 1

    awsome!

  2. 2
    PCS :

    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?

  3. 3
    Dale :

    Thanks a very well explained and displayed tutorial got me up and running. I really appreciate it!

  4. 4

    nice post…very helpful..thanks a lot…

Leave a Comment

Comment Policy: Thanks for visiting my site! Comments are a permanent record of who you are and what you stand for. Your words are your own, so be nice and helpful if you can. Unhelpful, disrespectful, or spammy comments will be deleted. All comments are read and appreciated, and if you have a question, I will try to respond within a couple days.

*