1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| # 查看nginx的进程 ~$ ps -aux | grep nginx root 3493 0.0 0.0 159060 1680 ? Ss 09:09 0:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; vagrant 3497 0.0 0.3 161788 7692 ? S 09:09 0:00 nginx: worker process vagrant 3498 0.0 0.3 161788 6792 ? S 09:09 0:00 nginx: worker process vagrant 3644 0.0 0.0 14428 1056 pts/1 S+ 09:13 0:00 grep --color=auto nginx
# 验证nginx配置文件 ~$ /usr/sbin/nginx -t nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1 # nginx:配置文件/etc/nginx/nginx.conf语法没问题 nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: [emerg] open() "/run/nginx.pid" failed (13: Permission denied) nginx: configuration file /etc/nginx/nginx.conf test failed # 重启nginx ~$ service nginx restart
|