• 搭建单向HTTPS


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


    //打开CMD窗口 cd C:wampinapacheApache2.4.9in //设置环境变量 set OPENSSL_CONF=..confopenssl.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:wampinapacheApache2.4.9confhttpd.conf,取消注释: Include conf/extra/httpd-ssl.conf LoadModule ssl_module modules/mod_ssl.so //配置:C:wampinapacheApache2.4.9confextrahttpd-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:wampwwwwww.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完事
  • 相关阅读:
    linux文件权限查看及修改(实用)
    将JSON对象带有格式的写出到文件中
    mySQL数据库Sql语句执行效率检查--Explain命令
    mysql优化
    Linux-设置固定IP
    logback 配置详解(二)——appender
    logback 配置详解(一)——logger、root
    Thread
    Singleton
    多线程编程总结
  • 原文地址:https://www.cnblogs.com/qq917937712/p/8879876.html
Copyright © 2020-2023  润新知