部署https后访问域名出现如下提示:
您的连接存在安全隐患
此网站使用的安全性配置已过时,这可能会导致您的信息(例如密码、消息或信用卡卡号)在发送至此网站的过程中遭到泄露。
原因是服务器openssl版本过低,较新版本的浏览器会提示不安全,
openssl version -a可查看openssl版本
Openssl1.0.0h支持SSLv2,SSLv3和TLSv1.0
Openssl1.0.1添加了对TLSv1.1和TLSv1.2的支持Openssl1.1.1开始支持TLS1.3
旧版(openssl1.0.2|openssh7.5)升级参看https://www.west.cn/faq/list.asp?unid=1754
升级openssl-1.1.1
cd/usr/local/srcwget-chttps://www.openssl.org/source/openssl-1.1.1g.tar.gztarzxvfopenssl-1.1.1g.tar.gzcdopenssl-1.1.1g./config–prefix=/usr–sharedmake-j4&&makeinstallopensslversion-a
升级openssh8.3p1
cd/usr/local/srcmv/etc/ssh/etc/ssh.bakyuminstall-ypam-develwget-chttps://openbsd.hk/pub/OpenBSD/OpenSSH/portable/openssh-8.3p1.tar.gztarzxvfopenssh-8.3p1.tar.gzcdopenssh-8.3p1./configure–sbindir=/usr/sbin/–bindir=/usr/bin/–sysconfdir=/etc/ssh–with-ssl-engine–with-pammake-j4&&makeinstallecho’PermitRootLoginyes’>>/etc/ssh/sshd_configecho’Port22000′>>/etc/ssh/sshd_configcp-acontrib/redhat/sshd.init/etc/init.d/sshdcp-acontrib/redhat/sshd.pam/etc/pam.d/sshd.pamchmod+x/etc/init.d/sshdchkconfig–addsshdchkconfigsshdonservicesshdrestart
centos7: mv /usr/lib/systemd/system/sshd.service /tmp
systemctl enable sshd
centos7: systemctl restart sshd.service
注意: 如果nginx编译时指定了自定义openssl路径,则还需要重新编译nginx
最新评论