Because of business needs, you need to migrate an HTTPS site under the original IIS to the Nginx front-end reverse proxy architecture.
The specific steps are:
Export the certificate on the Windows server where IIS resides.
1) "Start"---> "Run"---> MMC
2) "Add"---> "certificates"---> Add
3) Select "Computer Account"--->next
4) Select "Local Computer"--->ok
5) "Close"---> "OK"
6) Expand Certificates---> Personal certificates
7) Right-click the certificate you want to export
8) "All Tasks"---> "Export"
9) Follow the prompts to export a PFX file such as Sslcert.pfx
Upload the PFX file to the Linux server on which Nginx resides,
1) Export Private key
OpenSSL pkcs12-in [Sslcert].pfx-nocerts-out Key.pem
2) Remove the password from the private key (when exporting PFX in 1.9, you will be prompted for a password to protect the PFX)
OpenSSL rsa-in key.pem-out Server.key
3) Export Certificate
OpenSSL pkcs12-in [Sslcert].pfx-clcerts-nokeys-out Cert.pem
Copy the resulting cert.pem;server.key into the desired directory, such as in/etc/nginx/conf.d/ssl/
Edit test.com.conf (Nginx server's conf)
server {listen 443; server_name www.test.com; SSL on; SSL_CERTIFICATE/ETC/NGINX/CONF.D/SSL/CERT.PEM; Ssl_certificate_k Ey/etc/nginx/conf.d/ssl/server.key; Location/{proxy_pass http://test.com_server_pool;}}
This article is from the "Skybug" blog, make sure to keep this source http://skybug.blog.51cto.com/132577/1610877
How to Moving SSL Certificate (HTTPS) from IIS to Nginx