nginx服务更新证书
1 | nginx配置文件: /etc/nginx/sites_enabled |
配置跨域:
1 | 位置: http{这里, server{}} |
nginx 502 错误初步排查
- nginx 配置文件默认目录 /etc/nginx/nginx.conf
- 配置文件中有 include * 为包含的配置文件
- access_log off 为关闭日志, 开启后为 access_log /var/www/ccd.log
- 如果在日志文件中能看到请求说明与nginx无关, 是项目的问题
- nginx -s reload
- nginx -t 检查配置文件语法是否正确
- lsof -i:port1 检查端口使用 CLOSE_WAIT 时看 port1 -> port2 是port2出了问题