Files
loan-pricing/doc/implementation-report-2026-04-01-nginx-worker-user.md

20 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Nginx Worker 用户显式配置实施记录
## 修改内容
-`deploy/nginx.conf` 中显式增加 `user nobody;`
-`bin/prod/install_env.sh` 生成的 Nginx 配置模板中显式增加 `user nobody;`
- 计划将线上实际使用的 `/volume1/webapp/env/nginx/conf/nginx.conf` 同步改为显式 `user nobody;`
## 原因说明
- 当前线上 Nginx 实际以 `nobody` worker 进程运行
- 但配置文件未显式声明 worker 用户,后续重写配置时容易与实际运行态不一致
- 显式声明 `user nobody;` 可以让配置意图与当前运行方式保持一致
## 验证结果
- 已完成仓库配置文件与安装脚本模板修改
- 已同步修改线上实际配置 `/volume1/webapp/env/nginx/conf/nginx.conf`
- 已执行 `nginx -t -c /home/webapp/env/nginx/conf/nginx.conf`,语法校验通过
- 已执行 Nginx reload容器内进程显示 `nobody` 作为 worker 用户运行
- 已执行 `curl -I http://116.62.17.81:63311/`,返回 `HTTP/1.1 200 OK`
- 已执行 `curl http://116.62.17.81:63311/prod-api/login/test`,返回状态码 `200`