自己做网站做淘宝联盟,seo软件下载,用.net做购物网站,做网站平台的公司有哪些1. 现象放假期间收到zabbix报警#xff0c;提示主站访问不了#xff0c;报502。2.排查思路及过程因为是过年休息#xff0c;放假前又没有更新#xff0c;基本可以排除是更新和配置导致的问题。ssh连上服务器发现服务器连接和资源都没问题。这是一套lnamp架构的网站#xf… 1. 现象放假期间收到zabbix报警提示主站访问不了报502。2.排查思路及过程因为是过年休息放假前又没有更新基本可以排除是更新和配置导致的问题。ssh连上服务器发现服务器连接和资源都没问题。这是一套lnamp架构的网站就是nginx反向代理到Apache所以考虑是Apache的问题于是重启httpd服务。重启httpd服务的时候启动失败没有看到错误所以去查看日志文件看到如下报错tail -200 /var/log/httpd/error_log[TIME 2016] [error] SSL Library Error: -8181 Certificate has expired
[TIME 2016] [error] Unable to verify certificate Server-Cert. Add NSSEnforceValidCerts off to nss.conf so the server can start until the problem can be resolved.可以看到是证书过期了并且给出了一种解决方法是添加‘NSSEnforceValidCerts off’到nss.conf服务器就可以启动就是不验证证书过期时间。Apache是用https需要mod_nss的模块支持我的理解就是使用https需要安装mod_nss下面给一个官方说明 The mod_nss module provides strong cryptography for the Apache Web server via the Secure Sockets Layer (SSL) and Transport Layer Security (TLS) protocols using the Network Security Services (NSS) security library.我的解决方法是重新生成新的证书cd /etc/httpd/alias
#删除旧的证书
rm -f *.db
#创建新证书
/usr/sbin/gencert /etc/httpd/alias /etc/httpd/alias/install.log 21
#查看证书信息
certutil -d /etc/httpd/alias -L -n Server-Cert
Certificate:
Data:Version: 3 (0x2)Serial Number: 3 (0x3)Signature Algorithm: PKCS #1 SHA-1 With RSA EncryptionIssuer: CNCertificate Shack,Oexample.com,CUSValidity:Not Before: Mon Feb 15 02:05:10 2016Not After : Sat Feb 15 02:05:10 2020现在可以看到证书的有效期是4年新生成的证书到2020年过期。httpd服务可以正常启动。启动httpd服务后发现首页还是不能访问可以确认服务都正常启动配置没有问题。继续查看httpd的错误日志发现了新的报错[TIME 2016] [error] SSL Library Error: -8038 SEC\_ERROR\_NOT\_INITIALIZED
[TIME 2016] [error] NSS_Initialize failed. Certificate database: /etc/httpd/alias.百度了下发现是权限问题重新授下权搞定。chown root.apache /etc/httpd/alias/*.db
chmod 0640 /etc/httpd/alias/*.db 转载于:https://blog.51cto.com/branguo/1742157