title: Apache2, setup dynamic subdomains on localhost
body: <p>Simple question how?</p>
  
  <p>Now I have such enabled host</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ServerAdmin webmaster@localhost
  ServerName git.land
  
  DocumentRoot /home/sergey/public_html/git.land/public_html
  
  &lt;Directory /&gt;
      Options FollowSymLinks
      AllowOverride None
  &lt;/Directory&gt;
  
  &lt;Directory /home/sergey/public_html/git.land/public_html/&gt;
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order allow,deny
      allow from all
  &lt;/Directory&gt;
  
  ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  &lt;Directory "/usr/lib/cgi-bin"&gt;
      AllowOverride None
      Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
      Order allow,deny
      Allow from all
  &lt;/Directory&gt;
  
  ErrorLog ${APACHE_LOG_DIR}/error.log
  
  # Possible values include: debug, info, notice, warn, error, crit,
  # alert, emerg.
  LogLevel warn
  
  CustomLog ${APACHE_LOG_DIR}/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>And added rule in hosts</p>
  
  <pre><code>127.0.0.1   git.land
  </code></pre>
  
  <p>When I enter on "<a href="http://git.land" rel="nofollow">http://git.land</a>" it show proper direction. But when I try to get in "<a href="http://some.git.land" rel="nofollow">http://some.git.land</a>" is stucks. Thinks a lot and then redirect on prev. page (without subdomain).</p>
  
  <p>I want add subdomains to localhost for testing but I don't know what should I use for it. Base things I knew, I tried but it gives nothing.</p>
  
  <p>Also can I (maybe) somehow change it from .htaccess (I searched around and found people use them to get subdomains name without any configuration in hosts).</p>