nginx在macOS中的配置文件路径

首先,我用

brew list nginx

查到了用brew的方式安装的nginx所有目录:

/opt/homebrew/Cellar/nginx/1.21.3/.bottle/etc/ (15 files)
/opt/homebrew/Cellar/nginx/1.21.3/bin/nginx
/opt/homebrew/Cellar/nginx/1.21.3/homebrew.mxcl.nginx.plist
/opt/homebrew/Cellar/nginx/1.21.3/homebrew.nginx.service
/opt/homebrew/Cellar/nginx/1.21.3/html -> ../../../var/www
/opt/homebrew/Cellar/nginx/1.21.3/share/man/man8/nginx.8
/opt/homebrew/Cellar/nginx/1.21.3/share/nginx/ (2 files)

这时候你需要注意,目录:

/opt/homebrew/Cellar/nginx/1.21.3/.bottle/etc/ (15 files)

下有一个配置文件:

nginx.conf

并不是你需要修改的(假设你在/opt/homebrew/Cellar/nginx/1.21.3/html -> ../../../var/www 这里配置了一个vue工程)

你需要去修改

/opt/homebrew/etc/nginx/nginx.conf

两个配置文件并不一样!!!如果你修改错了那会浪费很多时间

上一篇:几大最短路径算法比较(Floyd & Dijkstra & Bellman-Ford & SPFA)


下一篇:imx6 uboot添加网卡驱动