Forum

VirtualHost Priority with Wildcard Hostname?

john
22 October 2018, 07:23
Hello. Since letsencrypt allow wildcard; I would like to use a
VirtualHost {
hostname= domain.com, *.domain.com
}
for a cms to catch all subdomains and

VirtualHost {
hostname = cdn.domain.com
}
to serve some other content.

However the *.domain.com declaration always override the cdn.domain.com? I reverse the position and restart, same problem? Is there a way to get cdn.domain.com to work first? Thank you.
Hugo Leisink
22 October 2018, 23:43
Make the wildcard hostname always the last one in your configuration.
This topic has been closed.