- 基于root用户权限操作
nginx 启动,重启,停止:进入 nginx/sbin 目录
配置文件测试:./nginx -t
nginx启动:./nginx
nginx重启:./nginx -s reload
nginx停止:./nginx -s stop
查看nginx进程
ps aux|grep nginx
一般这种情况(worker process 为 nobody)就是权限不正确或者不足
这种情况下,修改 nginx/conf/nginx.conf 文件第一行,去掉 #,改为 user root;
然后重启nginx,查看进程

如果进程为下面这种3个都是 root 的情况,那就问题解决了,权限正确了


网友评论