Step 1: Configure Apache to support SSL
Find the following two lines to remove the previous comment #
LoadModule Ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
Step 2: Generate the certificate and private key file for the Web server
C:Program filesapache Software foundationapache2.2bin>openssl genrsa-out server.key 1024
Generate a Server.key
Step 3: Generate the signing request
C:Program filesapache Software foundationapache2.2bin>openssl req-new-out server.csr-key ... Confopenssl.cnf
The signature file SERVER is generated at this time. DS5
Step 4: Use OpenSSL to generate the CA private key
C:Program filesapache Software foundationapache2.2bin>openssl genrsa-out ca.key 1024
More Ca.key files
Step 5: Use the CA's private key to generate a self-signed certificate for the CA
C:Program filesapache Software foundationapache2.2bin>openssl req-new-x509-days 365-key ca.key-out ca.crt-config .. Confopenssl.cnf
Step 6: Create a new Democa directory under the Bin directory, and under Democa, create a new index.txt,newcerts,serial directory structure as follows
Democa
|--index.txt (text, empty content)
|--newcerts (folder)
|--serial (text, Content 01)
Step 7: Prepare to sign the certificate for the Web server
C:Program filesapache Software foundationapache2.2bin>openssl ca-in server.csr-out server.crt-cert ca.crt-keyfile C A.key-config.. Confopenssl.cnf
Generating SERVER.CRT files
Step 8: Copy the SERVER.CRT Server.key to the Conf folder
------------------Configure SSL FAQ---------------------
Win7 System 64 bits in the configuration process, there may be a problem restarting Apache
Problem 1:apache reboot failed, error message syntax error on line of C:/Program Files (x86)/apache Software foundation/apache2.2/conf/extra/ Httpd-ssl.conf:
Sslsessioncache:invalid Argument:size has to be >= 8192 bytes
Solution:
Change the 61-63 lines in confextrahttpd-ssl.conf to the following Sslsessioncache "Dbm:c:/program Files (x86)/apache Software Apache2.2/logs/ssl_scache "
# Sslsessioncache "Shmcb:c:/program Files (x86)/apache Software Foundation/apache2.2/logs/ssl_scache (512000)"
Sslsessioncachetimeout 300