在咱们要更新过时证书时,首先要中止nginx服务器,否则会报错前端
Problem binding to port 80: Could not bind to IPv4 or IPv6.
中止后,咱们就要去中止我nginxnginx
[root@VM_165_102_centos sbin]# ps -ef|grep nginx
用命令:centos
[root@VM_165_102_centos sbin]# kill -quit 1461
杀死后,执行下面的命令就能够,命令:certbot certonly --cert-name charmip.com服务器
成功后重启nginx:ui
[root@VM_165_102_centos sbin]# ./nginx -s reload
会报错code
nginx: [error] invalid PID number "" in "/usr/local/nginx/logs/nginx.pid"
由于在咱们生成证书时会更新部分文件blog
须要执行以下代码:ip
[root@VM_165_102_centos sbin]# /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
而后重启服务便可:it
root@VM_165_102_centos sbin]# ./nginx -s reload
全栈交流:点击连接加入(458633781)【前端/全栈/NODEJS】:https://jq.qq.com/?_wv=1027&k=5l9bcQpclass