Under phpstudy environment how to install SSL certificates

Download good archive, compressed file to obtain a certificate of apache
first step: Modify the httpd.conf configuration file in the directory apache
1, # LoadModule ssl_module modules / mod_ssl.so delete the first line of configuration statements Notes symbol "#"
2, the Include Extra comment /httpd-ssl.conf this line of "#" removed
Step Two:
edit extra / httpd-ssl.conf file, modify the following:
behind ServerName into your domain, you can not bring the port number
behind the DocumentRoot website into the path
back into SSLCertificateFile server.crt file path
behind SSLCertificateKeyFile server.key file into the path
back into ca.crt SSLCertificateChainFile file path
that begins with ErrorLog line can be commented out (preceded by a #)
at the beginning of this line TransferLog You can comment out (preceded by a #)
at the beginning of this line can comment CustomLog (plus the previous number #)
3.phpstudy configuration specifies the path to access https (for reference only, you can not).
ON RewriteEngine
the RewriteCond the REQUEST_URI {%} / Homework
the RewriteRule ^ $ (*.)? HTTPS: // $%} {the SERVER_NAME. 1 [L, R & lt ]
4, save and exit, and restart Apache, if an error or does not start properly, see the error log.

Guess you like

Origin blog.51cto.com/14371730/2404385