nginx查看配置文件nginx.conf路径
如何学会nginx配置方法,如果忘了nginx的路径,可以用命令-t查看路径。
nginx配置文件的路径:
# 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路径:
ps aux | grep nginx
如nginx路径为:
/usr/local/nginx/sbin/nginx
然后执行以下命令:
/usr/local/nginx/sbin/nginx -V
默认放在 安装目录下:
conf/nginx.conf