赞
踩
1_www.domain.com_bundle.crt
和2_www.onclick.ac.cn.key
保存到/etc/nginx
/etc/nginx/nginx.conf
文件, 在http模块中添加以下内容# ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE # ssl_prefer_server_ciphers on; server{ listen 443; server_name www.onclick.ac.cn; #填写绑定证书的域名 ssl on; ssl_certificate 1_www.onclick.ac.cn_bundle.crt; ssl_certificate_key 2_www.onclick.ac.cn.key; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #按照这个协议配置 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#按照这个套件配置 ssl_prefer_server_ciphers on; location / { root /home/ubuntu/Hexo_Blog/app/public; index index.html index.htm; } }
XXX@***:/etc/nginx# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
7.平滑启动nginx
nginx -s reload
systemctl stop/start/restart nginx
systemctl stop/start/restart nginx.service
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。