I have defined several virtual hosts in my apache 2.4.12. They all are listening on port 80, but have different names. The problem is that I have 2 slightly similar virtual hosts, and the first one gets loaded when I try to acess the second one. What can be the issue?
the escr.dev host
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName escr.dev
ServerAlias www.escr.dev
DocumentRoot /var/www/escr.dev/application/web/
<Directory /var/www/escr.dev/application/web/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/escr.dev-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/escr.dev-access.log combined
</VirtualHost>
the esca.dev host
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName esca.dev
ServerAlias www.esca.dev
DocumentRoot /var/www/esca.dev/public/
<Directory /var/www/esca.dev/public/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/esca.dev-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/esca.dev-access.log combined
</VirtualHost>
So when I access "esca.dev" I am getting loaded the "escr.dev" host instead.
Host
header contains the expected value.