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.