Wednesday, November 9, 2011

Creating a Virtual Host with Webmin

These instructions apply to Webmin version 1.570 and Ubuntu 10.04
  1. Create a folder where you wish to store your sites files. 
    • You can do this in the Others > File Manager section. 
    • In this example we use: /var/www/vhosts/domainname.com/http/
  2. Setup the vhost.
    • Click on Servers > Apache Web Server in the left hand menu.
    • Click the “create virtual host” tab.
    • You can leave most settings as their default values, but you should fill out the following:
      • Port: Generally, you’ll want to use port 80.
      • Document Root: This is folder where you site’s files will be stored. Pick the folder you created in step 1.
      • Server name: This is just your site’s domain name, e.g. domainname.com (leave out the www.)
    • Click “Create Now”
  3. Add a server alias for www.domainname.com 
    • Click on the “Existing Virtual Hosts” tab in Servers > Apache Web Server.
    • Click the virtual server you just created.
    • Click on “Networking and Addresses”
    • In the “Alternate Virtual Server Names” box, add any additional server aliases you want to use for this site, such as www.domainname.com
    • Press “Save”.
  4. Click “Apply Changes” to get Webmin to restart Apache.
  5. vi /etc/apache2/sites-enabled/000-default and add:   NameVirtualHost *

No comments:

Post a Comment