首页 > 其他 > 详细

nginx 快速检查配置文件的方法

时间:2020-02-03 12:05:34      阅读:75      评论:0      收藏:0      [点我收藏+]

 

1.查看nginx路径

ps aux|grep nginx
root 352 0.0 0.0 2468624 924 ?? S 10:43上午 0:00.08 nginx: worker process 
root 232 0.0 0.0 2459408 532 ?? S 10:43上午 0:00.02 nginx: master process /usr/local/nginx/sbin/nginx -g daemon off; 
root 2345 0.0 0.0 2432772 640 s000 S+ 1:01下午 0:00.00 grep nginx


nginx的路径为:/usr/local/nginx/sbin/nginx


2.查看nginx配置文件路径


使用nginx的 -t 参数进行配置检查,即可知道实际调用的配置文件路径及是否调用有效。

/usr/local/nginx/sbin/nginx -t
nginx: the configuration file /data/conf/nginx/nginx.conf syntax is ok
nginx: configuration file /data/conf/nginx/nginx.conf test is successful

nginx 快速检查配置文件的方法

原文:https://www.cnblogs.com/sucretan2010/p/12254977.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!