{"id":690,"date":"2015-04-02T12:38:17","date_gmt":"2015-04-02T10:38:17","guid":{"rendered":"http:\/\/dety.net.ua\/?p=690"},"modified":"2015-04-02T12:38:17","modified_gmt":"2015-04-02T10:38:17","slug":"apache2windows-wildcard-ssl","status":"publish","type":"post","link":"https:\/\/dety.net.ua\/?p=690","title":{"rendered":"Apache2(Windows) + Wildcard SSL"},"content":{"rendered":"<p>I&#8217;ve got a .pfx and CA&#8217;s crt. I have to add it to my Apache&#8217;s SSL config.<\/p>\n<p>1. Collect CA&#8217;s certificates in one file &#8211; cmd for windows:<\/p>\n<blockquote><p>copy \/B ServerCA.crt + TrustCA.crt mycert.ca-bundle<\/p><\/blockquote>\n<p>2. Export a private key:<\/p>\n<blockquote><p>openssl pkcs12 -in mycert.pfx -nocerts -out mycert_key.pem -nodes<\/p><\/blockquote>\n<p>3. Export a certificate:<\/p>\n<blockquote><p>openssl pkcs12 -in mycert.pfx -nokeys -out mycert.pem<\/p><\/blockquote>\n<p>4. Remove passphrase from the certificate:<\/p>\n<blockquote><p>openssl rsa -in mycert_key.pem -out mycert.key<\/p><\/blockquote>\n<p>5. Configure Apache e.g.:<\/p>\n<blockquote><p>&lt;VirtualHost *:443&gt;<br \/>\nServerName my.site.net:443<br \/>\nServerAlias www.my.site.net<br \/>\nDocumentRoot &#8220;C:\/Apache\/htdocs\/mysite&#8221;<br \/>\nErrorLog &#8220;logs\/mysite-error.log&#8221;<br \/>\nCustomLog &#8220;logs\/mysite-access.log&#8221; common<br \/>\nSSLEngine on<br \/>\nSSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:-SSLv2:+SSLv3:+TLSv1:+EXP:+eNULL<br \/>\nSSLCertificateFile &#8220;C:\/Apache\/conf\/ssl\/mycert.pem&#8221;<br \/>\nSSLCertificateKeyFile &#8220;C:\/Apache\/conf\/ssl\/mycert.key&#8221;<br \/>\nSSLCertificateChainFile &#8220;C:\/Apache\/conf\/ssl\/mycert.ca-bundle&#8221;<br \/>\n&lt;FilesMatch &#8220;\\.(cgi|shtml|phtml|php)$&#8221;&gt;<br \/>\nSSLOptions +StdEnvVars<br \/>\n&lt;\/FilesMatch&gt;<br \/>\n&lt;Directory &#8220;C:\/Apache\/cgi-bin&#8221;&gt;<br \/>\nSSLOptions +StdEnvVars<br \/>\n&lt;\/Directory&gt;<br \/>\nBrowserMatch &#8220;.*MSIE.*&#8221; \\<br \/>\nnokeepalive ssl-unclean-shutdown \\<br \/>\ndowngrade-1.0 force-response-1.0<br \/>\nCustomLog &#8220;C:\/Apache\/logs\/ssl_request.log&#8221; \\<br \/>\n&#8220;%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \\&#8221;%r\\&#8221; %b&#8221;<br \/>\n&lt;\/VirtualHost&gt;<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve got a .pfx and CA&#8217;s crt. I have to add it to my Apache&#8217;s SSL config. 1. Collect CA&#8217;s certificates in one file &#8211; cmd for windows: copy \/B ServerCA.crt + TrustCA.crt mycert.ca-bundle 2. Export a private key: openssl pkcs12 -in mycert.pfx -nocerts -out mycert_key.pem -nodes 3. Export a certificate: openssl pkcs12 -in mycert.pfx [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13,1],"tags":[],"class_list":["post-690","post","type-post","status-publish","format-standard","hentry","category-novosti","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/690","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=690"}],"version-history":[{"count":1,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/690\/revisions"}],"predecessor-version":[{"id":691,"href":"https:\/\/dety.net.ua\/index.php?rest_route=\/wp\/v2\/posts\/690\/revisions\/691"}],"wp:attachment":[{"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dety.net.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}