国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Windows > 正文

windows下安裝apache并配置ssl全過程

2019-11-28 02:38:31
字體:
來源:轉載
供稿:網友
步驟1:配置 APACHE以支持SSL

找到下面兩行去掉前面的注釋 #

LoadModule ssl_module modules/mod_ssl.so

Include conf/extra/httpd-ssl.conf

步驟2: 為網站服務器生成證書及私鑰文件

C:/Program Files/Apache Software Foundation/Apache2.2/bin>openssl genrsa -out server.key 1024

生成一個server.key

步驟3:生成簽署申請

C:/Program Files/Apache Software Foundation/Apache2.2/bin>openssl req -new -out server.csr -key server.key -config ../conf/openssl.cnf

此時生成簽署文件 SERVER.CSR

步驟4:使用OPENSSL生成CA私鑰

C:/Program Files/Apache Software Foundation/Apache2.2/bin>openssl genrsa -out ca.key 1024

多出CA.key文件

步驟5:利用CA的私鑰產生CA的自簽署證書

C:/Program Files/Apache Software Foundation/Apache2.2/bin>openssl req -new -x509 -days 365 -key ca.key -out ca.crt -config ../conf/openssl.cnf

步驟6:在bin目錄下新建demoCA目錄,在demoCA下新建index.txt,newcerts,serial 目錄結構如下

demoCA

|--index.txt(文本,內容為空)

|--newcerts(文件夾)

|--serial(文本,內容為 01)

步驟7:準備為網站服務器簽署證書

C:/Program Files/Apache Software Foundation/Apache2.2/bin>openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config ../conf/openssl.cnf

生成 server.crt文件

步驟8:將 server.crt server.key復制到 conf文件夾下

------------------配置ssl常見問題---------------------

win7系統64位在配置過程中,在重啟apache時可能會出現問題

問題1:apache重啟失敗,報錯信息Syntax error on line 62 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/extra/httpd-ssl.conf:

SSLSessionCache: Invalid argument: size has to be >= 8192 bytes

解決辦法:

將conf/extra/httpd-ssl.conf中61-63行修改成下面這樣即可SSLSessionCache "dbm:C:/Program Files (x86)/Apache Software Foundation/Apache2.2/logs/ssl_scache"

# SSLSessionCache "shmcb:C:/Program Files (x86)/Apache Software Foundation/Apache2.2/logs/ssl_scache(512000)"

SSLSessionCacheTimeout 300
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 武宁县| 红安县| 施秉县| 莱芜市| 交城县| 泸定县| 泾川县| 金溪县| 萨迦县| 伊金霍洛旗| 溧水县| 梅州市| 乳源| 永嘉县| 福建省| 荆门市| 腾冲县| 天全县| 乐陵市| 靖江市| 广平县| 榆中县| 右玉县| 朝阳县| 新田县| 侯马市| 安阳县| 泸西县| 萝北县| 菏泽市| 武宣县| 白水县| 西贡区| 喀喇沁旗| 资兴市| 盐亭县| 秦皇岛市| 平武县| 黄冈市| 崇文区| 定远县|