I am setting up a few virtual hosts for my local Apache environment. I followed this as a basic guide: http://www.unixmen.com/setup-apache-virtual-hosts-on-ubuntu-15-10/
At the moment, I have the following structure: /var/www/home - 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 /var/www/sites - all sites are stored here.
My home.dev points to /var/www/home and localhost points to /var/www/sites (so I can type localhost/site1, if needed)
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 "localhost" or "home.dev." 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?
/etc/apache2/sites-available/home.conf
<VirtualHost *:80> ServerName www.home.dev ServerAlias home.dev DocumentRoot /var/www/home/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/home> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost> /etc/apache2/sites-available/localhost.conf
<VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot /var/www/sites/ <Directory/> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/sites> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost> /etc/apache2/sites-available/phpmyadmin.dev.conf
<VirtualHost *:80> ServerName phpmyadmin.dev ServerAlias phpmyadmin.dev DocumentRoot /var/www/sites/phpmyadmin <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/sites/phpmyadmin> Options Indexes FollowSymLinks MultiViews AllowOverride None Order allow,deny allow from all </Directory> </VirtualHost> /etc/hosts
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