Apache default NameVirtualHost does not work
- by Luc
Hello,
I have 4 Name Virtual Hosts on my apache configuration, each one using proxy_http to forward request to the correct server. They work fine.
<VirtualHost *:80>
ServerName application_name.domain.tld
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://server_ip/
ProxyPassReverse / http://server_ip/
</VirtualHost>
I then tried to add a default NameVirtualHost to take care of the requests for which the server name does not match one of the four others. Otherwise a request like some_weird_styff.domain.tld would be forwarded to one of the 4 VH.
I then added this one:
<VirtualHost *:80>
ServerAlias "*"
DocumentRoot /var/www/
</VirtualHost>
At the beginning it seemed to work fine, but at some point it appears that the requests that should be handed by one of the 4 regular hosts is "eaten" by the default one !!!
If I a2dissite this default host, everything is back to normal...
I do not really understand this.
If you have any clue...
thanks a lot,
Luc