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

首頁 > 網站 > Apache > 正文

apache https配置詳細步驟講解

2024-08-27 18:28:08
字體:
來源:轉載
供稿:網友
SSL: SSl是為Http傳輸提供安全的協議,通過證書認證來確保客戶端和網站服務器之間的數據是安全。也就是說在SSL下http傳輸是安全的,我們成為 https.

配置過程如下:
步驟一:安裝apache,使其支持SSL,并安裝php
1.安裝配有SSL模塊的apache,apache_2.2.8-win32-x86-openssl-0.9.8g
2.配置apache以支持SSL:打開apache的配置文件conf/httpd.conf
1)LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
去掉兩行前面的#
2)注意修改httpd-ssl.conf 文件里的兩個字段:
SSLCertificateFile "C:/Apache2.2/conf/server.crt"
SSLCertificateKeyFile "C:/Apache2.2/conf/server.key"
3.安裝php,整合apache和Php(略)
為下面你所生成的證書和密鑰地址。

步驟二:為網站服務器生成證書及私鑰文件
1. 生成服務器的私鑰
進入命令行:
D:/local/apache2/bin/openssl genrsa -out server.key 1024
在當前目錄下生成了一個server.key生成簽署申請
2. 生成簽署申請
D:/local/apache2/bin>openssl req -new –out server.csr -key server.key -config ../conf/openssl.cnf
此時生成簽署文件server.csr.

步驟三:通過CA為網站服務器簽署證書

1.生成CA私鑰
D:/local/apache2/bin/openssl genrsa -out ca.key 1024
多出ca.key文件
2.利用CA的私鑰產生CA的自簽署證書
D:/local/apache2/bin/openssl req -new -x509 -days 365 -key ca.key -out ca.crt -config ../conf/openssl.cnf
此時需要輸入一些信息,注意Common Name為服務器域名,如果在本機,為本機IP。
3.CA為網站服務器簽署證書
D:/local/apache2/bin/openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config ../conf/openssl.cnf
但,此時會報錯:
于是在在當前目錄創建demoCA,里面創建以下文件,index.txt,serial:serial內容為01,其他為空,以及文件夾 newcert.再執行一遍,即可生成server.crt文件

步驟四:然后將 server.crt,server.key復制到apache的conf文件夾下,重啟apache

步驟五:配置windows.
打開C:/WINDOWS/system32/drivers/etc下的etc文件:
修改為:
127.0.0.1 next0-testing.acgchina.8866.org
127.0.0.1 pp-testing.acgchina.8866.org
127.0.0.1 tlink-testing.acgchina.8866.org


步驟六:
在apache下寫入iframe網頁,并將testlink,projectpier也放入。
<iframe src="https://pp-testing.acgchina.8866.org/projectpier/index.php" width="300" height="300"></iframe>

<iframe src="https://tlink-testing.acgchina.8866.org/testlink/index.php" width="300" height="300"></iframe>

于是訪問https://next0-testing.acgchina.8866.org能看到正確的顯示。
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 万年县| 民县| 廊坊市| 鸡西市| 淳化县| 德阳市| 东港市| 徐汇区| 长寿区| 定州市| 张掖市| 新疆| 襄城县| 如皋市| 巩义市| 定兴县| 大足县| 西昌市| 淮安市| 郧西县| 犍为县| 长春市| 涟源市| 海淀区| 射阳县| SHOW| 蛟河市| 社旗县| 建阳市| 阜城县| 康平县| 稷山县| 南部县| 延吉市| 长宁区| 寿宁县| 宜黄县| 扬州市| 临猗县| 霍林郭勒市| 高平市|