修改路径文件 /usr/local/apache/conf/httpd.conf 文件
搜索
#Include conf/extra/httpd-ssl.conf
将注释去掉
把申请下来的证书文件放置到
/usr/local/apache/cert
目录下 这个可以自己放置
然后修改/usr/local/apache/conf/extra/httpd-ssl.conf 文件
直接替换为以下文件
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
SSLPassPhraseDialog builtin
#SSLSessionCache "dbm:/usr/local/apache/logs/ssl_scache"
SSLSessionCache "shmcb:/usr/local/apache/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
SSLMutex "file:/usr/local/apache/logs/ssl_mutex"
<VirtualHost *:443>
DocumentRoot /web/badcatxt.com/
ServerName badcatxt.com
ServerAlias badcatxt.com www.badcatxt.com
SSLEngine on
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder on
#SSLCipherSuite ALL:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateKeyFile /usr/local/apache/cert/badcatxt.key
SSLCertificateFile /usr/local/apache/cert/badcatxt_public.pem
SSLCertificateChainFile /usr/local/apache/cert/badcatxt_chain.pem
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "/usr/local/apache/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
php_admin_value open_basedir "/web/badcatxt.com/:/tmp/:/var/tmp/:/proc/"
<Directory /web/badcatxt.com/>
Options -Indexes +FollowSymLinks
AllowOverride All
#Require all granted
</Directory>
</VirtualHost>
然后将里面路径替换为自己申请证书的路径,以及域名的绑定这些。
然后将模版以及301全部设置一下就完成了!