After entering these contents, the server.csr file will be generated in the current directory.
# CP server . key server.key.org
# OpenSSL RSA-inserver.key.org-outserver.key (used to start NGINX with SSL function with the private key above)
# openssl509-req-days365-inserver.csr-signkeyserver.key-outserver.crt (sign the certificate with the above key and CSR.
Name)
Step 3 configure NGINX
Edit the NGINX configuration file of the domain name that needs to use HTTPS (the domain name of the commonly used website filled in above).
Server {
Listen to 443;
Server name www _ xxx _ com
Ssl open;
SSL _ certificate/usr/local/nginx/SSL/server . CRT;
SSL _ certificate _ key/usr/local/nginx/SSL/server . key;
}
Save and restart NGINX, thus building a simple https service website (single authentication).