linux下如何查找nginx配置文件的位置,方法如下:
先找出nginx可执行文件的路径
ps -ef | grep nginx
# ps -ef |grep nginx
root 15236 15026 0 09:29 pts/0 00:00:00 grep nginx
root 19731 1 0 2017 ? 00:00:03 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
nginx 19732 19731 0 2017 ? 00:20:30 nginx: worker process
那么,/etc/nginx/nginx.conf就是nginx的配置文件了.