title: how to create subdomains in apache(xampp) server?
body: <p>I've trying to create subdomain in my local xampp installation for some time.
  I tried editing my httpd.conf file and I entered the following:</p>
  
  <pre><code>NameVirtualHost *:80
  
  &lt;VirtualHost *:80&gt;
  DocumentRoot /ecommerce
  ServerName ecomm.localhost
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>I also edited my windows hosts file and entered:
  127.0.0.1 ecomm.localhost</p>
  
  <p>But when I type 'ecomm.localhost' in my firefox it gives me:
  Access forbidden!!!
  Can please anybody help me out? What exactly I'm doing wrong? I'm fairly new to this.
  I simply want to create multiple folders in my 'htdocs' folder and use them as different websites with subdomain. For example:
  c:\xampp\htdocs\mainSite   ----->    mainSite.com or mainSite.localhost
  c:\xampp\htdocs\subSite    ----->    subSite.mainSite.com or subSite.mainSite.localhost</p>