Home  >  Article  >  Backend Development  >  Enable https using the free startssl service

Enable https using the free startssl service

WBOY
WBOYOriginal
2016-07-29 08:59:031163browse

Enable https on the website or use the free startssl service

The key steps to use https in the website are:

1. Use your own company information to generate your own CSR file and key file, one of the following methods.

The first type: online generation [https://www.trustasia.com/tools/csr-generator.htm]
The second type:
openssl req -new -nodes -keyout yourname.key -out yourname.csr
linux command line generation
The third method: [https://download.startpki.com/startcom/startcomtool.exe] Download and use this tool to generate

2. Use your own csr and key files to register your own domain name on startssl.com and generate Your own certificate crt.

Free abroad: https://startssl.com/Certificates/ApplySSLCert
Domestic free: SSL certificate: WoSign free SSL certificate G2 (application address https://buy.wosign.com/ApplyForSSL.html choose the first free SSL)

3. Configure and use your own certificate crt on nginx

<code><span>#</span>
 server {
     listen       <span>443</span><span>;</span>
     server_name  xxx<span>.clcw</span><span>.com</span><span>.cn</span><span>;</span>
     root         html<span>;</span>     ssl                  on<span>;</span>
     ssl_certificate      /home/songaimin/job/nginx-conf/ssl/xxx<span>.clcw</span><span>.com</span><span>.cn</span>_bundle<span>.crt</span><span>;</span>
     ssl_certificate_key  /home/songaimin/job/nginx-conf/ssl/xxx<span>.clcw</span><span>.com</span><span>.cn</span><span>.key</span><span>;</span>     ssl_session_timeout  <span>5</span>m<span>;</span>     ssl_protocols  SSLv2 SSLv3 TLSv1<span>;</span>
     ssl_ciphers  HIGH:!aNULL:!MD5<span>;</span>
     ssl_prefer_server_ciphers   on<span>;</span>     location / {
     }
 }</code>

Restart the nginx server and check if 443 starts normally.

Visit https://xxx.clcw.com.cn and look at the address bar. There is a green lock mark. Congratulations on your success! ! ! !

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces the use of the free startssl service to enable https, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn