{"id":5063,"date":"2022-06-01T11:12:55","date_gmt":"2022-06-01T03:12:55","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/?p=5063"},"modified":"2022-06-01T11:13:01","modified_gmt":"2022-06-01T03:13:01","slug":"windows%e6%9c%8d%e5%8a%a1%e5%99%a8apache%e7%8e%af%e5%a2%83%e9%85%8d%e7%bd%aessl","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/5063\/","title":{"rendered":"windows\u670d\u52a1\u5668Apache\u73af\u5883\u914d\u7f6eSSL"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<figure id=\"pid17071\" class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>\u5728apache\u7684\u914d\u7f6e\u6587\u4ef6(httpd.conf)\u4e2d,\u5bf9\u4ee5\u4e0b\u4e24\u53e5\u8bdd\u53d6\u6d88\u6ce8\u91ca<\/strong>\u6ce8\u610f\uff1a\u7b2c\u4e00\u6761\u52a0\u8f7d<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/ssl\/\" title=\"ssl\" target=\"_blank\">ssl<\/a><\/span>\uff0c\u7b2c\u4e8c\u6761\u5f15\u5165\u914d\u7f6e\u6587\u4ef6<br><br>\u5728\u4f60\u7684<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/apache\/\" title=\"Apache\" target=\"_blank\">Apache<\/a><\/span>\u76ee\u5f55\u4e2d\u627e\u5230\\conf\\httpd.conf\u5e76\u6253\u5f00,\u627e\u5230\u5982\u4e0b\u4e24\u884c<br># LoadModule ssl_module modules\/mod_ssl.so<br># Include conf\/extra\/httpd-ssl.conf<br>\u5c06\u8fd9\u4e24\u884c\u524d\u9762\u7684\u6ce8\u91ca\u7b26\u53f7 # \u53bb\u6389\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code>LoadModule ssl_module modules\/mod_ssl.so (\u5982\u679c\u627e\u4e0d\u5230\u8bf7\u786e\u8ba4\u662f\u5426\u7f16\u8bd1\u8fc7 openssl \u63d2\u4ef6)\r\nInclude conf\/extra\/httpd-ssl.conf<\/code><\/pre>\n\n\n\n<p>\u914d\u7f6ehttpd-ssl.conf\u6587\u4ef6<br>\u5728\u4f60\u7684Apache\u76ee\u5f55\u4e2d\u627e\u5230\\conf\\extra\\httpd-ssl.conf<br>\u5728httpd-ssl.conf\u6587\u4ef6\u4e2d\u6700\u540e\u9762\u6dfb\u52a0\u5982\u4e0b\u4fe1\u606f\uff0c\u5176\u4e2d\u57df\u540d\u5730\u5740\u6839\u636e\u81ea\u5df1\u7684\u5b9e\u9645\u60c5\u51b5\u4fee\u6539\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Listen 443\r\n \r\nSSLPassPhraseDialog  builtin\r\n \r\nSSLSessionCache        \"shmcb:\/Apache24\/logs\/ssl_scache(512000)\"\r\nSSLSessionCacheTimeout  300\r\n \r\n&lt;VirtualHost _default_:443&gt;\r\n \r\nDocumentRoot \"E:\\web\\public\"\r\nServerName www.abc.com:443\r\nServerAdmin admin@example.com\r\n \r\nSSLEngine on\r\n \r\nSSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL\r\n \r\nSSLCertificateFile \"C:\\Apache24\\cert\\www\\public.pem\"\r\n \r\nSSLCertificateKeyFile \"C:\\Apache24\\cert\\www\\214132021230522.key\"\r\n \r\nSSLCertificateChainFile \"C:\\Apache24\\cert\\www\\chain.pem\"\r\n \r\n&lt;FilesMatch \"\\.(cgi|shtml|phtml|php)$\"&gt;\r\n    SSLOptions +StdEnvVars\r\n&lt;\/FilesMatch&gt;\r\n&lt;Directory \"\/Apache24\/cgi-bin\"&gt;\r\n    SSLOptions +StdEnvVars\r\n&lt;\/Directory&gt;\r\n \r\nBrowserMatch \".*MSIE.*\" \\\r\n         nokeepalive ssl-unclean-shutdown \\\r\n         downgrade-1.0 force-response-1.0\r\n \r\n#   Per-Server Logging:\r\n#   The home of a custom SSL log file. Use this when you want a\r\n#   compact non-error SSL logfile on a virtual host basis.\r\nCustomLog \"\/Apache24\/logs\/ssl_request.log\" \\\r\n          \"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b\"\r\n \r\n&lt;\/VirtualHost&gt;<\/code><\/pre>\n\n\n\n<p>\u5728\u7f51\u7ad9\u6839\u76ee\u5f55\u7684.htaccess\u6587\u4ef6\u4e2d\u914d\u7f6e\u8df3\u8f6c<br>\u914d\u7f6e<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/http%e8%b7%b3%e8%bd%achttps\/\" title=\"http\u8df3\u8f6chttps\" target=\"_blank\">http\u8df3\u8f6chttps<\/a><\/span><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;IfModule mod_rewrite.c&gt;\r\n    RewriteEngine on\r\n    RewriteBase \/\r\n    RewriteCond %{SERVER_PORT} !^443$\r\n    RewriteRule ^.*$ https:\/\/%{SERVER_NAME}%{REQUEST_URI} &#091;L,R]\r\n&lt;\/IfModule&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5728apache\u7684\u914d\u7f6e\u6587\u4ef6(httpd.conf)\u4e2d,\u5bf9\u4ee5\u4e0b\u4e24\u53e5\u8bdd\u53d6\u6d88\u6ce8\u91ca\u6ce8\u610f\uff1a\u7b2c\u4e00\u6761\u52a0\u8f7dssl\uff0c\u7b2c\u4e8c\u6761\u5f15\u5165\u914d\u7f6e\u6587\u4ef6<\/p>\n","protected":false},"author":5,"featured_media":5057,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1481],"tags":[1493,1556,1554,1486,212,1484,266,1555],"special":[],"attr":[],"class_list":{"0":"post-5063","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-ssl","8":"tag-apache","10":"tag-apachessl","11":"tag-httphttps","12":"tag-ssl","14":"tag-windows","15":"tag-1555","16":"entry"},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/5063","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=5063"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/5063\/revisions"}],"predecessor-version":[{"id":5064,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/5063\/revisions\/5064"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media\/5057"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=5063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=5063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=5063"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=5063"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=5063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}