CentOS 6.7下nginx SSL证书部署的方法
环境
系统环境:CentOS6.7
nginxversion:nginx/1.8.1
证书
#ls/opt/nginx/conf/ssl qingkang.me.crt#公钥 qingkang.me.key#私钥
配置
vimnginx.conf
找到以下内容
#HTTPSserver
#
#server{
#listen443ssl;
#server_namelocalhost;
#ssl_certificatecert.pem;
#ssl_certificate_keycert.key;
#ssl_session_cacheshared:SSL:1m;
#ssl_session_timeout5m;
#ssl_ciphersHIGH:!aNULL:!MD5;
#ssl_prefer_server_cipherson;
#location/{
#roothtml;
#indexindex.htmlindex.htm;
#}
#}
修改为:
server{
listen443ssl;
server_nameqingkang.me;
ssl_certificatessl/qingkang.me.crt;
ssl_certificate_keyssl/qingkang.me.key;
ssl_session_cacheshared:SSL:1m;
ssl_session_timeout5m;
ssl_ciphersHIGH:!aNULL:!MD5;
ssl_prefer_server_cipherson;
location/{
roothtml;
indexindex.htmlindex.htm;
}
}
检查配置
/opt/nginx/sbin/nginx-t
重启Nginx生效
/opt/nginx/sbin/nginx-sreload
总结
以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作能带来一定的帮助,如果有疑问大家可以留言交流,谢谢大家对毛票票的支持。
热门推荐
10 八一幼儿祝福语大全简短
11 公司乔迁食堂祝福语简短
12 婚礼结束聚餐祝福语简短
13 儿媳买车妈妈祝福语简短
14 毕业送礼老师祝福语简短
15 同事辞职正常祝福语简短
16 恭贺新婚文案祝福语简短
17 金店立秋祝福语简短英文
18 婆婆高寿祝福语大全简短