十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
文章又名:https多网站1个IP多个SSL证书的Apache设置办法
引言:
设置过程:
::购买证书不多阐述,网上很多教程都讲过。
#启用ssl模块
#LoadModule ssl_module modules/mod_ssl.so
#LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
#Include conf/extra/httpd-ssl.conf
弃掉前面的 # 号
可以新建一个文件替代,如新建文件extar/ssl_one.conf
相应的,在httpd.conf中将Include conf/extra/httpd-ssl.conf条目修改为Include conf/extra/ssl_one.conf
下面是实例:
Listen 443NameVirtualHost *:443SSLStrictSNIVHostCheck offDocumentRoot "/usr/local/apache/htdocs/example.com"ServerName example.comServerAlias subdomain.example.comServerAdmin you@example.comSSLEngine onSSLProtocol all -SSLv2SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5SSLCertificateFile "/usr/local/apache/conf/server.crt"SSLCertificateKeyFile "/usr/local/apache/conf/server.key"SSLCertificateChainFile "/usr/local/apache/conf/1_root_bundle.crt" SSLOptions +StdEnvVars AllowOverride All SSLOptions +StdEnvVars DocumentRoot "/usr/local/apache/htdocs/example2.com"ServerName example2.comServerAlias subdomain.example2.comSSLEngine onSSLProtocol all -SSLv2SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5SSLCertificateFile "/usr/local/apache/conf/server2.crt"SSLCertificateKeyFile "/usr/local/apache/conf/server2.key"SSLCertificateChainFile "/usr/local/apache/conf/1_root_bundle2.crt" SSLOptions +StdEnvVars AllowOverride All SSLOptions +StdEnvVars
说明:一个
service httpd restart