Implement SSL using Apache in Windows

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.