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

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

相关文章

最近做自动化测试时,深感自己对前端涉猎太少,加上对这块比...
homebrew本身就是一个git仓库。使用homebrew安装软件包时,会...
一、Homebrew安装、卸载等命令Homebrew的安装和卸载都非常简...
在mac系统中,使用homebrew可以很方便的管理包。按照官网的说...
我按照说明从这里使用brew安装mysqlhttps://gist.github.com...
我在macOS10.12.4上安装了nginx1.10.3和php5.5.38作为开发服...