1. 查看进程列表
通过 ps ax | grep nginx 命令,查看正在运行的 nginx 进程。
2. 检查 nginx 守护进程
使用 systemctl status nginx 命令,查看 nginx 守护进程的状态。
3. 查看 nginx 配置文件
检查 nginx 配置文件 /etc/nginx/nginx.conf 中的 user 和 worker_processes 设置。
4. 查看日志文件
检查 nginx 日志文件 /var/log/nginx/error.log 和 /var/log/nginx/access.log,了解启动过程中遇到的任何错误或警告。
5. 使用 nginx 工具
使用 nginx -t 命令,检查 nginx 配置的语法。
6. 查看系统服务
检查系统服务是否正在运行,使用 systemctl is-active nginx 命令。
7. 使用 netstat 命令
使用 netstat -anp | grep nginx 命令,查看 nginx 正在监听的端口。
上一篇:nginx启动提示找不到文件
下一篇:nginx普通用户启动限制