{"id":3007,"date":"2017-09-22T08:16:37","date_gmt":"2017-09-22T08:16:37","guid":{"rendered":"https:\/\/intelligentbee.com\/blog\/?p=3007"},"modified":"2024-12-19T09:42:54","modified_gmt":"2024-12-19T09:42:54","slug":"install-pxf-windows-ssl-certificate-linux-web-server","status":"publish","type":"post","link":"https:\/\/intelligentbee.com\/blog\/install-pxf-windows-ssl-certificate-linux-web-server\/","title":{"rendered":"How To Install A .pxf Windows SSL Certificate On Your Linux Web Server"},"content":{"rendered":"<p>Windows uses <code>.pfx<\/code> for a PKCS #12 file. PFX stands for Personal eXhange Format. This is like a bag containing multiple cryptographic information. It can store private keys, certificate chains, certificates and root authority certificates. It is password protected to preserve the integrity of the contained data.<br \/>\nIn order to install it on our apache\/nginx web server we need to convert it PEM.<\/p>\n<h2>How To Install A .pxf Windows SSL Certificate On Your Linux Web Server<\/h2>\n<p>Upload first the <code>.pfx<\/code> to your linux server. You will need OpenSSL installed.<\/p>\n<p>On Centos run:<\/p>\n<pre class=\"toolbar:2 nums:false lang:default decode:true \">yum install openssl<\/pre>\n<p>On Ubuntu run:<\/p>\n<pre class=\"toolbar:2 nums:false lang:default decode:true\">sudo apt-get update\r\nsudo apt-get install openssl\r\n<\/pre>\n<p>To decript the <code>.pfx<\/code> use:<\/p>\n<pre class=\"toolbar:2 nums:false lang:default decode:true\">openssl pkcs12 -in cert.pfx -out cert.pem\r\n<\/pre>\n<p>You will be prompted for the password that was used to encrypt the certificate. After providing it, you will need to enter a new password that will encrypt the private key.<br \/>\nThe <code>.pem<\/code> file resulted will contain the encrypted public key, the certificate and some other information we will not use.Copy the key from inside and paste it to a new <code>.key<\/code> file.<br \/>\nAlso copy the certificate from the <code>.pem<\/code> and put it in a new <code>.cert<\/code> file.<\/p>\n<p>Remember to copy the whole blocks, including the dashed lines.<br \/>\nThe private key file is still encrypted, so we have to decrypt it with:<\/p>\n<pre class=\"toolbar:2 nums:false lang:default decode:true\">openssl rsa -in cert.key -out cert.key\r\n<\/pre>\n<p>You will now be prompted for the password you set to encrypt the key. This will decrypt the private key file to itself.<\/p>\n<p>To install the certificate to Nginx, you will need to import your <code>.key<\/code> and <code>.cert<\/code> in Nginx configuration file like this:<\/p>\n<pre class=\"toolbar:2 nums:false lang:default decode:true\">ssl_certificate \/path\/to\/your\/cert.pem;\r\nssl_certificate_key \/path\/to\/your\/cert.key;\r\n<\/pre>\n<p>For Apache use:<\/p>\n<pre class=\"toolbar:2 nums:false lang:default decode:true\">SSLCertificateFile \/path\/to\/your\/cert.pem;\r\nSSLCertificateKeyFile \/path\/to\/your\/cert.key;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Windows uses .pfx for a PKCS #12 file. PFX stands for Personal eXhange Format. This is like a bag containing [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73],"tags":[],"yst_prominent_words":[982,1013,1009,990,987,986,985,984,983,355,981,980,979,978,970,729,512],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts\/3007"}],"collection":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/comments?post=3007"}],"version-history":[{"count":4,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts\/3007\/revisions"}],"predecessor-version":[{"id":133368,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/posts\/3007\/revisions\/133368"}],"wp:attachment":[{"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/media?parent=3007"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/categories?post=3007"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/tags?post=3007"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/intelligentbee.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=3007"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}