Configure a Free ssl certificate for nginx in linux to support secure https access

Source: Internet
Author: User


Free ssl certificate application

Apply for a Free SSL certificate from the http://www.wosign.com/Products/free_SSL.htm.

Download www.111cn.net.zip, decompress the file, find for Nginx.zip, and decompress the file.

Listen www.111cn.net_bundle.crt, 2_www.111cn.net.key

Change www.111cn.net. crt to www.111cn.net. key and upload it to the server for backup.

Deployment of https support for configuring SSL certificates in Nginx

Find the corresponding server

Add


Listen 443 ssl;
Ssl on;
Ssl_certificate/usr/local/nginx/conf/ssl/www.111cn.net. crt;
Ssl_certificate_key/usr/local/nginx/conf/ssl/www.111cn.net. key;
Ssl_session_timeout 5 m;
Ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
Ssl_ciphers ALL :! ADH :! EXPORT56: RC4 + RSA: + HIGH: + MEDIUM: + LOW: + SSLv2: + EXP;
Ssl_prefer_server_ciphers on;
 

Reload nginx configuration

[Root @ do ssl] #/etc/init. d/nginx reload

The https: // www.111cn.net trusted by the browser is available ~

 

Supplement

Convert pfx to the crt and key required by nginx

If you already have a certificate with the pfx extension, you need to convert it


[Root @ do ~] # Openssl pkcs12-in www.111cn.net. pfx-nocerts-nodes-out www.111cn.net. key
Enter Import Password: Enter the certificate Password
MAC verified OK
 
 
[Root @ do ~] # Openssl pkcs12-in www.111cn.net. pfx-clcerts-nokeys-out www.111cn.net. crt
Enter Import Password: Enter the certificate Password
MAC verified OK
 

Generate two files: www.111cn.net. key, www.111cn.net. pfx, and copy them to your specified directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.