title: how to create a subdomain in a dedicated apache2 server
body: <p>I want to create a subdomain I followed this steps :</p>
  
  <pre><code>cd /etc/apache2/sites-available
  nano test.mydomaine.com
  
  &lt;VirtualHost *:80&gt;
          ServerAdmin mymail@gmail.com
          ServerName  test.mydomaine.com
          ServerAlias www.test.mydomaine.com
          DocumentRoot /var/www/testfolder/
  &lt;Directory "/var/www/testfolder"&gt;
          AuthType Basic
          AuthName "test"
          AuthUserFile /var/www/testfolder/passwords
          Require valid-user test
  &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>exit and save</p>
  
  <pre><code>a2ensite test.mydomaine.com
  /etc/init.d/apache2 reload
  </code></pre>
  
  <p>but It's not working am I missing something ?</p>