Apche ssl is not working
Posted
by
user1703321
on Server Fault
See other posts from Server Fault
or by user1703321
Published on 2012-09-28T20:40:39Z
Indexed on
2012/09/29
3:40 UTC
Read the original article
Hit count: 500
I have configure virtual host on 80 and 443 port(Centos 5.6 and apache 2.2.3), following is the sample, i have wrote the configuration in same order
Listen 80
Listen 443
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.abc.be
ServerAlias abc.be
.
.
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.abc.fr
ServerAlias abc.fr
.
.
</VirtualHost>
then i have define 443
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName www.abc.be
ServerAlias abc.be
.
.
SSLEngine on
SSLCertificateFile /etc/ssl/private/abc.be.crt
SSLCertificateKeyFile /etc/ssl/private/abc.be.key
SSLCertificateChainFile /etc/ssl/private/gd_bundle_be.crt
</VirtualHost>
<VirtualHost *:443>
ServerAdmin [email protected]
ServerName www.abc.fr
ServerAlias abc.fr
.
.
SSLEngine on
SSLCertificateFile /etc/ssl/private/abc.fr.crt
SSLCertificateKeyFile /etc/ssl/private/abc.fr.key
SSLCertificateChainFile /etc/ssl/private/gd_bundle_fr.crt
</VirtualHost>
First ssl certificate for abc.be is working fine, but 2nd domian abc.fr still load first ssl.
following the output of apachictl -s
VirtualHost configuration:
wildcard NameVirtualHosts and _default_ servers:
*:443 is a NameVirtualHost
default server www.abc.be (/etc/httpd/conf/httpd.conf:1071)
port 443 namevhost www.abc.fr (/etc/httpd/conf/httpd.conf:1071)
Thanks
© Server Fault or respective owner