搭建單向HTTPS

2021-09-10 02:26:58 字數 1229 閱讀 1887

//參考**:

//開啟cmd視窗

cd c:\wamp\bin\apache\apache2.4.9\bin //設定環境變數 set openssl_conf=..\conf\openssl.cnf //生成server.key openssl genrsa 1024>server.key //生成server.csr openssl req -new -key server.key > server.csr //需要使用者輸入國家**之類的資訊: //注意:其中的common name只能輸入網域名稱(www.oa.com)或ip:192.168.1.103 cn—zj—hz—relay2—oa—[email protected] //生成server.crt openssl req -x509 -days 365 -key server.key -in server.csr > server.crt //在bin 目錄下,找到 server.crt server.csr server.key 複製到apache的conf目錄下 //配置:c:\wamp\bin\apache\apache2.4.9\conf\httpd.conf,取消注釋: include conf/extra/httpd-ssl.conf loadmodule ssl_module modules/mod_ssl.so //配置:c:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-ssl.conf sslcertificatekeyfile 「c:/wamp/bin/apache/apache2.4.9/conf/server.key」 sslsessioncache 「shmcb:c:/wamp/bin/apache/apache2.4.9/logs/ssl_scache(512000)」 //配置vhost檔案 443> documentroot "d:\wamp\www\www.newdefend.com" servername sslengine on sslcertificatefile "d:/wamp/bin/apache/apache2.4.9/conf/server.crt" sslcertificatekeyfile "d:/wamp/bin/apache/apache2.4.9/conf/server.key"

//重啟wamp完事

posted @

2018-04-19 09:04

懶牛拉車 閱讀(

...)

編輯收藏

HTTPS 單向認證

hyper text transfer protocol超文字傳輸協議 明文 傳輸的資料不加密 hyper text transfer protocol over secure socket layer 安全的超文字傳輸協議 ssl secure socket layer安全套接層協議 對稱加密 公...

HTTPS環境搭建

1 進入到 jdk下的 bin目錄 2 輸入如下指令 keytool v genkey alias tomcat keyalg rsa keystore d tomcat.keystore d tomcat.keystore 是將生成的 tomcat.keystore放到d 盤根目錄下。注意若要放到...

Tomcat下啟用https 訪問(單向)

通過jdk自帶的keytool即可建立,命令如下 keytool genkey alias tomcat keyalg rsa依次依照提示輸入即可,執行完成,會在當前使用者目錄下產生乙個.keystore檔案。修改 tomcat home conf server.xml檔案 其中keystorepa...