title: How to create multiple virtual hosts with apache2 and zend
body: <p>I have created zend application in /var/www/zendapp , but i have also installed mediawiki app
  in /var/www/mediawiki </p>
  
  <p>Now i want to access mediawiki app with <a href="http://mediawiki.local" rel="nofollow">http://mediawiki.local</a></p>
  
  <p>and <a href="http://zendapp.local" rel="nofollow">http://zendapp.local</a>. </p>
  
  <p>How can i do that?</p>
  
  <p>I had couple of unsuccessful atempts. So far i edited /etc/hosts and added these two lines: </p>
  
  <pre><code>127.0.0.1     zendapp.local
  127.0.0.1     mediawiki.local
  </code></pre>
  
  <p>I also created two files in /etc/apache2/sites-available/ : </p>
  
  <pre><code>zendapp
  mediawiki
  </code></pre>
  
  <p>mediawiki : </p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
      ServerAdmin webmaster@localhost
  
      ServerName mediawiki.local
      DocumentRoot /var/www/mediawiki
      &lt;Directory /&gt;
              Options FollowSymLinks
              AllowOverride All
      &lt;/Directory&gt;
      &lt;Directory /var/www/mediawiki&gt;
              Options Indexes FollowSymLinks MultiViews
              AllowOverride All
              Order allow,deny
              allow from all
      &lt;/Directory&gt;
  </code></pre>
  
  <p>zendapp : </p>
  
  <pre><code>ServerName zendapp.local
  SetEnv APPLICATION_ENV "development"
  
  DocumentRoot /var/www/zendapp/public
  
  &lt;Directory /var/www/zendapp/public&gt;
      Options Indexes FollowSymLinks Includes
      AllowOverride All
      Order allow,deny
      Allow from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p>But now it semes that only zendapp.local works, and if  I go to :
  <a href="http://mediawiki.local" rel="nofollow">http://mediawiki.local</a></p>
  
  <p>it redirects me to <a href="http://zendapp.local/mediawiki/index.php/Main_Page" rel="nofollow">http://zendapp.local/mediawiki/index.php/Main_Page</a></p>