ps aux|grep nginx
root 3520.00.02468624924 ?? S 10:43上午 0:00.08nginx: worker process
root 2320.00.02459408532 ?? S 10:43上午 0:00.02nginx: master process/usr/local/opt/nginx/bin/nginx -g daemon off;
root 23450.00.02432772640 s000 S+ 1:01下午 0:00.00 grep nginx
nginx的路径为:/usr/local/opt/nginx/bin/nginx
2.查看nginx配置文件路径
使用nginx的 -t 参数进行配置检查,即可知道实际调用的配置文件路径及是否调用有效。
/usr/local/opt/nginx/bin/nginx -t
nginx:the configuration file/usr/local/etc/nginx/nginx.conf syntax is ok
nginx: configuration file/usr/local/etc/nginx/nginx.conf test is successful