title: How to Configure Virtual Hosts on Apache server on Ubuntu 15
body: <p>I am setting up a few virtual hosts for my local Apache environment. I followed this as a basic guide: <a href="http://www.unixmen.com/setup-apache-virtual-hosts-on-ubuntu-15-10/" rel="nofollow noreferrer">http://www.unixmen.com/setup-apache-virtual-hosts-on-ubuntu-15-10/</a></p>
  
  <p>At the moment, I have the following structure:
  <code>/var/www/home</code> - there is a script here that looks inside the "sites" directory and produces a page with a button for each folder in the "sites" directory
  <code>/var/www/sites</code> - all sites are stored here.</p>
  
  <p>My home.dev points to /var/www/home and localhost points to <code>/var/www/sites</code> (so I can type localhost/site1, if needed)</p>
  
  <p>The problem is that only the localhost and home.dev work properly. When I address other sites, I get "requested URL not found" error. What is even stranger, I get the same page when I type <strong>"localhost"</strong> or <strong>"home.dev."</strong> This should not be happening. To be clear, none of the other sites work. I provide phpMyAdmin site as an example. Here are the listings of some config files. Can anyone give me a clue of what's going wrong?</p>
  
  <p><strong>/etc/apache2/sites-available/home.conf</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName www.home.dev
          ServerAlias home.dev
          DocumentRoot /var/www/home/
          &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
          &lt;Directory /var/www/home&gt;
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from all
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><strong>/etc/apache2/sites-available/localhost.conf</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName localhost
          ServerAlias localhost
          DocumentRoot /var/www/sites/
          &lt;Directory/&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
          &lt;Directory /var/www/sites&gt;
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from all
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><strong>/etc/apache2/sites-available/phpmyadmin.dev.conf</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName phpmyadmin.dev
          ServerAlias phpmyadmin.dev
          DocumentRoot /var/www/sites/phpmyadmin
          &lt;Directory /&gt;
                  Options FollowSymLinks
                  AllowOverride None
          &lt;/Directory&gt;
          &lt;Directory /var/www/sites/phpmyadmin&gt;
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride None
                  Order allow,deny
                  allow from all
          &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p><strong>/etc/hosts</strong></p>
  
  <pre><code>127.0.0.1   localhost
  127.0.1.1   userman-desktop
  127.0.2.1   home.dev
  127.0.3.1   phpmyadmin.dev
  127.0.5.1   sites.dev
  
  
  ::1     ip6-localhost ip6-loopback
  fe00::0 ip6-localnet
  ff00::0 ip6-mcastprefix
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters
  </code></pre>