本文摘自PHP中文网,作者尚,侵删。

nginx的配置放在nginx.conf文件中,一般我们可以使用以下命令查看服务器中存在的nginx.conf文件。
1 2 3 4 | locate nginx.conf
/usr/local/etc/nginx/nginx.conf
/usr/local/etc/nginx/nginx.conf. default
...
|
如果服务器中存在多个nginx.conf文件,我们并不知道实际上调用的是哪个配置文件,因此我们必须找到实际调用的配置文件才能进行修改。
查看nginx实际调用的配置文件
1、查看nginx路径
1 2 3 4 | 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
阅读剩余部分
相关阅读 >>
nginx的配置文件在哪
更多相关阅读请进入《nginx的配置文件在哪》频道 >>
转载请注明出处:木庄网络博客 » nginx的配置文件在哪