//参考网址:51278262
//Open cmdWindows CD C:\wamp\bin\apache\Apache2.4.9\bin//Setting environment variablesSet openssl_conf=. \conf\openssl.cnf//Generate Server.key OpenSSL Genrsa1024>server.key//Generate SERVER.CSR OpenSSL req-New-key Server.key > SERVER.CSR//You need to enter information such as country code://Note: One of the common NameOnly domain names can be entered (www.oa.com) or IP: 192.168.1.103 CN-zj-hz-relay2-oa—[Email protected]//Generate SERVER.CRT OpenSSL req-x509-days365-key server.key-in SERVER.CSR > Server.crt//In the binDirectory, find Server.crt SERVER.CSR Server.keyCopy to ApacheThe ConfDirectory under//Configuration: C:\wamp\bin\apache\Apache2.4.9\conf\httpd.conf, uncomment: Include conf/extra/httpd-ssl.conf LoadModule ssl_module modules/mod_ssl.so//Configuration: 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.4512000) "// configuration Vhost file <virtualhost *:443> DocumentRoot Span class= "hljs-string" > "D:\wamp\www\www.newdefend.com" ServerName https:// Newdefend.dvsslengine onsslcertificatefile d:/wamp/bin/apache/apache2.4.9/conf/ Server.crt "Sslcertificatekeyfile " D:/wamp/bin/apache/apache2.4.9/conf/server.key "< /virtualhost>// restart Wamp finished
Build one-way HTTPS