title: How to configure subdomains for Apache2 on Ubuntu?
body: <p>I followed these <a href="http://wp.headynation.com/localhost-subdomains-on-ubuntu-linux-10-10-maverick/">instructions to configure subdomains for apache</a>. I can access the subdomain using <code>http://localhost/test</code> though I cannot access it via <code>http://test.localhost</code>. How can I realize the latter?</p>
  
  <pre><code># /etc/apache2/sites-available/test.localhost
  &lt;VirtualHost *:80&gt;
  
      # Server name
      ServerName test.localhost
  
      # Document root
      DocumentRoot /var/www/test/
  
      # Custom log file locations
      ErrorLog  /var/www/test/logs/error.log
      CustomLog /var/www/test/logs/access.log combined
  
  &lt;/VirtualHost&gt;
  </code></pre>