Windows 64位下爲wampserver或phpstudy 騰訊雲免費SSL證書安裝

目錄apache

如文章對你有用的話請點個 贊windows

1.下載證書網站

20181109084143298.png

解壓 後複製Apache文件夾ui


20181109084350404.png

2.打開httpd.ini配置文件spa

LoadModule ssl_module modules/mod_ssl.so將這行的註釋的「#」去掉code

Include extra/httpd-ssl.conf將這行的註釋的「#」去掉server

ps:沒有就添加blog

3.接下來:extra/httpd-ssl.conf文件ip

ServerName 後面改爲你的網站域名,能夠不帶端口號ssl

DocumentRoot後面改爲網站路徑(注意:windows系統目錄是反斜槓)

SSLCertificateFile 後面改爲server.crt文件路徑,公鑰(這裏是相對目錄用斜線/)

SSLCertificateKeyFile 後面改爲server.key文件路徑,私鑰

SSLCertificateChainFile 後面改爲ca.crt文件路徑,根證書

簡單例子

Listen 443

SSLPassPhraseDialog  builtin

SSLSessionCache        "shmcb:/Apache24/logs/ssl_scache(512000)"

SSLSessionCacheTimeout  300

<VirtualHost _default_:443>

DocumentRoot "網站的根目錄在電腦上絕對路徑(如c:\WWW 注意windows系統目錄是反斜槓\)"

ServerName 你的域名:443

SSLEngine on

SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL

SSLCertificateFile "剛纔下載的Apache在電腦上絕對路徑/2_你的域名.crt"

SSLCertificateKeyFile "剛纔下載的Apache在電腦上絕對路徑/3_你的域名.cn.key"

SSLCertificateChainFile "剛纔下載的Apache在電腦上絕對路徑/1_你的域名.crt"

</VirtualHost>                                 

#中文的須要你改動

2.apache可能重啓會失敗

打開cmd:

cd到apachebinhttpd.exe -t

會出現錯誤緣由:模塊缺失

ps:錯誤緣由百度下

相關文章
相關標籤/搜索