1.Nginx Configure SSL, prohibit HTTP access
Certificate file Cert.pem, which contains two pieces of content, do not delete any part of the content.
If the CSR is created by the certificate system, it also contains: Certificate private key File Cert.key.
(1) Create the Cert directory under Nginx installation directory, and copy all downloaded files to the Cert directory. If you are creating a CSR file when you request a certificate, place the corresponding private key file in the Cert directory and name it cert.key;
(2) Open the nginx.conf file in the Conf directory under the Nginx installation directory to find:
server{Listen443; server_name localhost; SSL on; #root html; #index index.html index.htm; Ssl_certificate cert/your_cert_name. Pem; Ssl_certificate_key cert/your_key_name. Key; Ssl_session_timeout 5m; Ssl_ciphers ECDHE-rsa-aes128-gcm-sha256:ecdhe:ecdh:aes:high:! null:!anull:! md5:! Adh:!RC4; Ssl_protocols TLSv1 TLSv1.1TLSv1.2; Ssl_prefer_server_ciphers on; Location/{root HTML; Index index.html index.htm; }} server{Listen the; server_name Www.YOUR_SITE Your_site; Return301Https//$server _name$request_uri;}
Web configuration simple logging (multiple updates)