设置ssl网页加密的方法:
1.下载证书,并上传到服务器。
2.打开网站目录,找到usr/local/Nginx/conf下的"xxx.conf"这个文件。(xxx是你的域名前缀)
3.打开文件并添加以下内容:
listen 443 ssl http2;
ssl_certificate /usr/local/nginx/conf/ssl/www.yisu.com.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/www.yisu.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
ssl_prefer_server_ciphers on;
ssl_session_timeout 10m;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_buffer_size 1400;
add_header Strict-Transport-Security max-age=15768000;
ssl_stapling on;
ssl_stapling_verify on;
4.重启nginx,使ssl配置生效即可。