How can nginx set HTTPS protocol

Time:2022-5-27
1. Nginx – V confirm whether the current nginx is loaded with — with HTTP_ ssl_ Module module
 
2. Set HTTPS access protocol in the server module (here is the SSL certificate applied on Alibaba cloud)
 
listen 443 ssl http2; # the SSL listening port must be enabled. Http2 refers to binary transmission
ssl_ certificate /data/123/123. com_ bundle. crt; # certificate path
ssl_ certificate_ key /data/123/123. com. key; Path of # request authentication 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.1 TLSv1.2;
ssl_prefer_server_ciphers on;
 
3. Enter nginx / SBIN/ Nginx – s reload, restart nginx