Creating new sites and sub-domains with Webmin

STEP ONE: Make the docroot

  • Login to your VPS via SSH
#mkdir /home/domain.com/
#mkdir /home/domain.com/www/
#exit

docs root

STEP TWO: Create the Apache Configuration

  • Login via Webmin
-Click Apache Webservers
-Click Create virtual host

-Change the value of 'Document Root' to the folder you created via SSH (eg. /home/domain.com/www/)
-Change the value of Server Name to the name of the site (eg. example.com -or- sub.example.com)
-Click Create Now


-Click Apply Changes (this is in the uper right corner)

STEP THREE: Add the WWW or other Parked domains (optional)

While still in Webmin and in the Apache section do the following....

Click on Existing Virtual Hosts
Click on the Virtual Host you wish to modify
Click on Networking and Addresses

In the Alternate Virtual Server Names textarea, add any addition aliases you want to use such as www.example.com or www.sub.example.com or even parked domains www.example.org



Click Save
Click Apply Changes (this is in the uper right corner)

You may now create the necessary DNS records from your domain registrar for the domain or sub-domain you just created on your VPS (remember your aliases too!) and begin building in the docroot you created in step one!