Configure Apache + OpenSSL in Windows

Source: Internet
Author: User
Tags openssl rsa openssl x509

I found many similarArticleThis article is clear, concise, and clear.
Address: http://www.zhangdi.name/2008/02/19/apache-ssl-under-windows.html

1. Download Apache HTTP Server that contains OpenSSL. The latest version is apache_2.2.8-win32-x86-openssl-0.9.8g.msi

2. install Apache. It is best to install it in the root directory of the disk, for example, C:/apache2.2 /. A domain name must be set during installation. If it is only for local testing, you can add a domain name to the hosts file to point to the local IP address.

3. open the file: % installation directory %/CONF/httpd. conf and remove the comments of the following two lines:

 
Loadmodule ssl_module modules/mod_ssl.so
 
Include CONF/extra/httpd-ssl.conf

4. Switch to the directory % installation directory %/bin in the console. Run the following three-line command: (the value of the common name item must be the same as that of your website domain name. For example, test.com or www.test.com .)

 
OpenSSL req-New-out server. CSR-config ../CONF/OpenSSL. CNF
 
OpenSSL RSA-In privkey. pem-out server. Key
 
OpenSSL X509-in server. CSR-out server. CRT-req-signkey server. Key-days 3650

5. Copy the server. Key and server. CRT in the directory to the %/conf directory.

6. Restart the Apache HTTP Server service.

7. Access https://test.com. (Assume that this domain name is used during installation .)

If the apache service fails to be started, run % installation directory %/bin/httpd.exe to view the error message, which is helpful for correcting the error.

 

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.