SETUP:
Apache/2.4.6
Ubuntu 12.x
I am having trouble setting up any virtual hosts on my LAN. I want to have multiple name based virtual hosts. The first example vhost i am setting up is days.com. Unfortunately, when I type that address, Apache/2.4.6 does not redirect the address to the vhost.
Heres my days.com.conf (enabled) in /etc/apache2/sites-available:
Code:
<VirtualHost *:80>
ServerName days.com
ServerAlias www.days.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/zzz
#ErrorLog ${APACHE_LOG_DIR}/error.log
#CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory />
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I enabled it using:
Code:
sudo a2ensite days.com.conf
sudo service apache2 reload
* Reloading web server apache2
If I run the following command I get this response:
VirtualHost configuration:
Code:
*:80 is a NameVirtualHost
default server localhost (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost localhost (/etc/apache2/sites-enabled/000-default.conf:1)
port 80 namevhost days.com (/etc/apache2/sites-enabled/days.com.conf:1)
alias www.days.com
Heres my /etc/hosts file setup:
Code:
#127.0.0.1 localhost
#Virtual Hosts
127.0.0.1 days.com www.days.com duck.dev
days.com days.com www.days.com
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-l ocalnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
What am I doing wrong?
FYI:
The only two conf files in /etc/apache2/sites-available and /etc/apache2/sites-enabled are:
Code:
000-default.conf
days.com.conf
Bookmarks