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
两个配置文件并不一样!!!如果你修改错了那会浪费很多时间
标签:opt,macOS,Cellar,..,配置文件,nginx,homebrew,1.21 来源: https://www.cnblogs.com/LostSecretGarden/p/15536596.html