I've got a httpd24 server that I want to use to server multiple domains.
I've got a 3 VirtualHost definitions.
<VirtualHost *:443>
ServerName one.example.com
# SSL stuff
DocumentRoot "/opt/rh/httpd24/root/var/www/one
</VirtualHost>
<VirtualHost *:443>
ServerName two.example.com
# SSL stuff
DocumentRoot "/opt/rh/httpd24/root/var/www/two
</VirtualHost>
<VirtualHost _default_:443>
Redirect / https://two.example.com
</VirtualHost>
The idea being that if the exact url one.example.com or two.example.com is entered they'll get the appropriate pages. If any other domain is received I want to redirect to the https://two.example.com url.
However I'm finding that if I enter https://three.example.com I'm not getting redirected, instead the content for one.example.com is served.
Note that https://two.example.com does work as expected. My issue is that I'm expected unknown domains to be redirected, but they are instead being resolved as if they were one.example.com.
The RPM I installed originally was httpd24-httpd-2.4.27-8.el6.1.x86_64.
Any ideas what is going on?