The installation procedure is as follows:
1. downloadApache HTTP Server. Note that you need to download the version with OpenSSL.
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.