Recently in a project, the project was previously used. NET do, now need to rewrite with PHP. After development, you need to migrate the SSL certificate on IIS to the Apache environment.
Workaround:
Roughly three steps
First, export the certificate file to IIS
1. Start-> Run->mmc
2. Menu-> file-> Add/Remove snap-in
3. Select the certificate entry and add
4. In the wizard, select the computer account .... Detailed steps are not mentioned.
5. Output a password when exporting, Note: This password is useful when generating key and cert under Apache.
Two, under Apache use OpenSSL pkcs12 to extract the key and cert files from the exported PFX file
1. Copy the exported PFX file into Apache OpenSSL to avoid path problems caused by environment variables not set
2. Enter the cmd window and enter the following instructions
OpenSSL pkcs12-in xxx.pfx-nodes-out xxx.pem
OpenSSL rsa-in xxx.pem-out xxx.key OpenSSL x509-in xxx.pem-out
Xxx.crt
In the Apache configuration file, use the following instructions to install the
Sslcertificatefile "XXX.CRT"
sslcertificatekeyfile "Xxx.key"