Linux+nginx SSL Certificate Installation

Source: Internet
Author: User
Tags ssl certificate nginx ssl
One. Nginx installation of SSL certificate requires Two configuration Files

1_ROOT_BUNDLE.CRT , 2_domainname.com.key.

Note: These three certificate files are in folder for Nginx.zip, example:1_root_bundle.crt is the root certificate chain (public key), 2_ Domainname.com.key is the private key.

(Where: Certificate public key, private key file is usually named after your domain name; the certificate suffix CRT and CER are the same nature).

Two. Nginx Installation certificate

1. Open the nginx.conf file in the Conf directory under the Nginx installation directory
Found it:
# HTTPS Server
#
#server {
# Listen 443;
# server_name localhost;
# SSL on;
# ssl_certificate Cert.pem;
# Ssl_certificate_key Cert.key;
# ssl_session_timeout 5m;
# ssl_protocols SSLv2 SSLv3 TLSv1;
# ssl_ciphers all:! Adh:! Export56:rc4+rsa:+high:+medium:+low:+sslv2:+exp;
# ssl_prefer_server_ciphers on;
# location/{
# root HTML;
# index index.html index.htm;
# }
#}

Modify it to:
server {
Listen 443;
server_name localhost;
SSL on;
Ssl_certificate 1_root_bundle.crt; (Certificate public key)
Ssl_certificate_key 2_ domainname.com.key; (Certificate private key)
Ssl_session_timeout 5m;
Ssl_protocols SSLv3 TLSv1;
Ssl_ciphers high:! Adh:! Export56:rc4+rsa:+medium;
Ssl_prefer_server_ciphers on;
Location/{
root HTML;
Index index.html index.htm;
}
}

Note: The configuration of the site path and the default page after the completion of the configuration should be consistent with port 80.

2. start Nginx, access the domain name of the https://+ certificate binding

Note: After deployment, if the website can not be accessed through HTTPS, you can confirm that the server 443 port is open or blocked by acceleration tools such as website defender.
(1) Open method: Firewall Settings-Exception port-add 443 port (TCP).
(2) If blocked by the Security or acceleration tool, you can add 443 to the trust list in the interception record.
After rebooting, re-access via HTTPS.


For details, please see the link: http://www.zzidc.com/main/help/showHelpContent/id_460.html

The above describes the Linux+nginx SSL certificate installation, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.