码迷,mamicode.com
首页 > Web开发 > 详细

搭建单向HTTPS

时间:2018-04-19 10:29:46      阅读:181      评论:0      收藏:0      [点我收藏+]

标签:http   shm   httpd   comm   csr   rtu   zha   gen   clu   

//参考网址:https://blog.csdn.net/haolipengzhanshen/article/details/51278262


//打开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—OA1078285863@qq.com //生成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文件 <VirtualHost *:443> DocumentRoot "D:\wamp\www\www.newdefend.com" ServerName https://newdefend.dv SSLEngine on SSLCertificateFile "D:/wamp/bin/apache/apache2.4.9/conf/server.crt" SSLCertificateKeyFile "D:/wamp/bin/apache/apache2.4.9/conf/server.key" </VirtualHost> //重启wamp完事

搭建单向HTTPS

标签:http   shm   httpd   comm   csr   rtu   zha   gen   clu   

原文地址:https://www.cnblogs.com/qq917937712/p/8879876.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!