微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

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

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐