Home > front end >  Apache when configure HTTPS web hosting, met a strange problem, tortured for more than a week
Apache when configure HTTPS web hosting, met a strange problem, tortured for more than a week

Time:09-29

When apache configuration HTTPS virtual host, a strange problems

Apache version: apache/2.2.14
System: the FreeBSD

HTTPD - SSL. Conf content:

Listen to 443
NameVirtualHost * : 443

DocumentRoot "/data/user/123456.com"
ServerName 123456. com
ServerAlias www.123456.com
CustomLog/var/log/HTTPD/- access_log combined
ErrorLog/var/log/HTTPD/- 443 - error_log

SSLEngine on
SSLProtocol all - SSLv2 - SSLv3
SSLCipherSuite HIGH:! RC4:! MD5:! aNULL:! ENULL:! NULL:! DH:! EDH:! EXP: + MEDIUM
SSLHonorCipherOrder on
SSLCertificateFile/usr/local/etc/apache22/cert/123456.com public. CRT
SSLCertificateKeyFile/usr/local/etc/apache22/cert/123456.com.key
SSLCertificateChainFile/usr/local/etc/apache22/cert/123456.com chain. CRT

Order to allow a deny
Allow the from all



DocumentRoot "/data/user/abcd.com"
ServerName abcd.com
ServerAlias www.abcd.com
CustomLog/var/log/HTTPD/abcd - 443 - access_log combined
ErrorLog/var/log/HTTPD/abcd - 443 - error_log

SSLEngine on
SSLProtocol all - SSLv2 - SSLv3
SSLCipherSuite HIGH:! RC4:! MD5:! aNULL:! ENULL:! NULL:! DH:! EDH:! EXP: + MEDIUM
SSLHonorCipherOrder on
SSLCertificateFile/usr/local/etc/apache22/cert/abcd.com public. Pem
SSLCertificateKeyFile/usr/local/etc/apache22/cert/abcd.com.key
SSLCertificateChainFile/usr/local/etc/apache22/cert/abcd.com chain. Pem

Order to allow a deny
Allow the from all




Problem description:
From the www.123456.com web site is normal, but through the 123456. com, abcd.com, www.abcd.com, suggests to establish a secure connection failure


Doubt is caused by ServerName here, but I don't know why, I ask



CodePudding user response:

Is not recommended in the apache ServerAlias statement, he is not, the consequences of
You should set up four statements, used to identify 163. com www.163.com 263. com www.263.com

.


Remember: only use ServerName 163. com, do not use ServerAlias statements,
  • Related