nginx在macOS中的配置文件路径

2021/11/11 7:09:44

本文主要是介绍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

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



这篇关于nginx在macOS中的配置文件路径的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程