APACHE Open SSL Service Tutorial

  

1. First make sure your Apache server has an encryption module installed, either OpenSSL or OpenSSL+ModSSL. If your Apache web server is installed on a Unix or Linux platform, you can get OpenSSL at: http://www.openssl.org/source/If your Apache web server is running on a Windows platform, you can pass the following The URL gets OpenSSL + ModSSL: http://www.modssl.org/contrib/

2. Generate a key pair to the Apache server via OpenSSL # openssl req -new -nodes -keyout private .key -out public.csr Here, you need to answer some questions based on the actual information of your Apache server, mainly: Country Name, State or Province Name, Locality Name , Organization Name, Organization Unit Name, Common Name, Email Name, a challenge password, optional company name (An opentional company name) ). It is necessary to note here that the country name must be the standard abbreviation, China is the CN; the common name must be the FQDN.

3, then, in your current directory will produce two files: private.key and public.csr. Private.key is your private key and public.csr is the certificate request file. 4, visit http://demo.sheca.com/testca/TCert1/tcert.asp, apply for a free WEB site certificate, free of charge for only 15 days of use. Paste the contents of the public.csr request file into the application page and complete the application for the certificate.

5. After you have applied for the certificate, copy the certificate file to the directory where you just saved the private key and the requested file.

6. Now configure the http.conf file of your Apache server and open the https service. Please use the editor (unix or linux can use vi, windows use notpad. Please do not use word processing software such as word, because it will include some invisible control characters) Add the following content: SSLCertificateFile /etc/ssl/crt/public .der SSLCertificateKeyFile /etc/ssl/crt/private.key Please modify the above based on the actual address of your certificate and private key.

7. Restart your Apache server. You can do this by starting the script. # apachectl stop # apachectl startssl This way, the Apache server's ports 80 and 443 provide services at the same time.

Copyright © Windows knowledge All Rights Reserved