Share how I step-by-step to configure SSL on Nginx.
First, make sure that the OpenSSL library is installed and that the –with-http_ssl_module parameter is used when installing Nginx.
Beginner or rookie recommends using LNMP for one-click installation.
To generate a certificate:
Enter the directory where you want to generate the certificate
Cd/usr/local/nginx/conf
Create a server private key using OpenSSL and enter the information for the appropriate prompt
OpenSSL genrsa-des3-out Server.key 1024
Create certificate signing requests (Certificate Signing request (CSR))
OpenSSL Req-new-key server.key-out SERVER.CSR
Clear prompt must enter key when starting Nginx with SSL
CP Server.key Server.key.orgopenssl rsa-in server.key.org-out Server.key
Signing a certificate with a newly generated private key and CSR
OpenSSL x509-req-days 365-in server.csr-signkey server.key-out server.crt
Configuration Description:
Join in Server
SSL On;ssl_certificate/usr/local/nginx/conf/server.crt;ssl_certificate_key/usr/local/nginx/conf/server.key;
Set the listen port to 443 and start the test.
SSL configuration method for Nginx security certificate under Linux