Article reference http://dufei.blog.51cto.com/382644/90532/
Assume that Wamp has been installed successfully. The phpstudy suite is used and the Apache installation path is c: \ Program Files \ phpstudy \ apache2.
1 first download openssl-0.9.8g for Windows
2 unzip and copy to c: \ Program Files \ phpstudy \ openssl-0.9.8g_win32
3 command line mode, CD to c: \ Program Files \ phpstudy \ openssl-0.9.8g_win32 \ bin
4. Generate the private key of the server
> OpenSSL genrsa-out server. Key 1024.
The server. Key file is generated in the current directory.
5
Generate the signing File> OpenSSL req-New-out server. CSR-key server. Key-config... \ apache2 \ conf \ OpenSSL. CNF
The OpenSSL. CNF file path varies depending on the installation location.
Enter the configuration information during the generation process. Do not leave it blank. Otherwise, the CA certificate cannot be generated.
The server. CSR file is generated in the current directory.
6
Generate CA private key> OpenSSL genrsa-out ca. Key 1024
The CA. Key file is generated in the current directory.
7
Create the democa directory under the OpenSSL \ bin directory, which contains the following files and directories:
File: index.txt (content is blank)
File: Serial (content: 01)
Directory: newcerts
8
Use the private key of the CA to generate the self-signed certificate of the CA.
> OpenSSL req-New-X509-days 365-key ca. Key-out ca. CRT-config... \ apache2 \ conf \ OpenSSL. CNF
The OpenSSL. CNF file path varies depending on the installation location.
The CA. CRT file is generated in the current directory.
9. Copy server. CRT and server. Key to the conf directory of Apache.
10 configure Apache to support SSL
Loadmodule ssl_module modules/mod_ssl.so include CONF/extra/httpd-ssl.conf remove the front of the two lines #
11. Modify the path information in the conf/extra/httpd-ssl.conf file according to the actual installation location of Apache,
12 restart Apache