We have 3 Domains pointing to one IP. Among them 2 Domains (app.fr , app.com) need to be SSL certified. we do have sub domains and our certificate supports sub domains as well.
app.fr has sub domain admin.app.fr - that loads fine under https app.com also has a sub domain admin1.app.com - that's not loading https gives the bellow error
This server could not prove that it is admin.app.com;
its security certificate is from "*.app.fr". This may be caused by a
misconfiguration or an attacker intercepting your connection.
when I put the app.com vhost 1st and app.fr bellow.
admin1.app.com loads fine
admin.app.fr gives error on load
This server could not prove that it is admin1.app.fr; its security certificate is from "*.app.com". This may be caused by a misconfiguration or an attacker intercepting your connection.
It taking the 1st vhost certificate as default - I guess
Can Anyone help me to Solve the Issue Please,
Bellow is my http.conf
<VirtualHost ip:80>
DocumentRoot /app/
ServerAlias *.app.fr
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.+)\.app\.fr$ [NC]
RewriteCond %{HTTP_HOST} !=www.app.fr
RewriteRule (.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</VirtualHost>
<VirtualHost ip:80>
DocumentRoot /app/
ServerAlias *.app.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.+)\.app\.com$ [NC]
RewriteCond %{HTTP_HOST} !=www.app.com
RewriteRule (.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</VirtualHost>
<VirtualHost ip:443>
DocumentRoot /app/
ServerAlias *.app.fr
SSLEngine on
SSLCertificateFile /certificate.crt
SSLCertificateKeyFile /fr_server.key
SSLCertificateChainFile /SSLCA2.pem
</VirtualHost>
#SSL app.com
<VirtualHost ip:443>
DocumentRoot /app/
ServerAlias *.app.com
SSLEngine on
SSLCertificateFile /certificate1.crt
SSLCertificateKeyFile /com_server.key
SSLCertificateChainFile /SSLCA2.pem
</VirtualHost>