Adding Virtual Domains to Apache

Virtual Hosts are great for servers, it allows you to have multiple domains, Subdomains and Users all use the same Web Host (Server) and Is easy to configure.

 

First Please make sure your server is configured to use Virtual Hosts, See Here , Please note this is fundamental

 

Now you have your domain on a Virtual host you can now add others, But you need to add your Host to your DNS zone file from your domain regestrar, See Here

 

 

Now you are ready browse to your Apache installation folder and go to httpd-vhosts.conf

[box type=”shadow”]apacheconfextrahttpd-vhosts.conf[/box]

 

and add the extra hosts you setup in your Domain Registrars DNS Host Names like so,

(be sure to replace ‘dds’ with your subdomain)

Make sure this is at the end of your file, after your root of the domain, make sure you have configured the subdomain folder and the DNS Host names

Be aware that It can take up to 48 hours for Host Records to update through the internet!