微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

查看Nginx实际调用配置文件

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/opt/Nginx/bin/Nginx -g daemon off; 
root 2345 0.0 0.0 2432772 640 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


测试可知,Nginx配置文件路径为:/usr/local/etc/Nginx/Nginx.conf 且调用有效。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐