• Sales: 1-800-961-2888
  • Support: 1-800-961-4454

Ubuntu Intrepid - Webmin - Adding an Apache Virtual Host


This article will lead you through adding a virtual host to apache using the webmin interface. Webmin while being open source, is very powerful for a system admin, if not 100% user friendly.


Contents

//

First Things First

So if this is the first Virtual Host that you are going to install you may need to install and configure Apache to run in webmin, if you already have this setup, skip to the next step. Luckily for us Webmin has had some drastic improvements in the last couple of years, and is working alot better, especially in Ubuntu. So, what we are going to do is click on Un-used Modules on the left hand menu. Then find and click on the Apache Webserver, in that menu you'll have a little paragraph that says click here to install Apache:

apache%20module%20install.png

install%20progress.png

 

The Virtual Host

Default VHost

Ok so, when you click on Server -> Apache Webserver you'll see two blue globes. These two globes represent the default Apache VHost located in /var/www/. Every VHost after this will be represented by their own globe and to the right will be their basic information.

Adding a VHost

Go ahead and click on Create virtual host, we're going to fill out some default information here in this wizard:

Handle Connections - Any Address (you can set specific IP addresses if you have more than one IP) Port - Default Document Root - /home/demo/public_html Server Name - your domain name you wish to publish Add Virtual Host to file - leave this default, so it will play friendly with Ubuntu

configuring%20vhost.png

At this point we can hit Create Now, this will automatically create the new configuration file, and leave it in /etc/apache2/sites-available directory. This means the site is created, but not published, we'll get to that a little later.

Fine tuning the config

Click on Servers -> Apache Webserver -> the VirtualHost you created in this menu, you will click on the Networking and Addresses. From here we are looking for 'Alternate virtual server names', here we can enter all of the server alias this site should respond too like "www.demodomain.com".

www.demodomain.png

Apply Changes

To finish out, click on Apply Changes in the top right hand of the screen. This will push your domain into production and do a reload of Apache.

List of Articles

Brandon Woodward, RHCE 17:01, 25 March 2009 (CDT)







© 2011-2013 Rackspace US, Inc.

Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License


See license specifics and DISCLAIMER