1.更新brewhome ,终端里输入
brew update
2.安装nginx
终端里输入brew install nginx
3.启动nginx 服务
brew services start nginx
重启: brew services restart nginx
查看nginx安装目录:
open /usr/local/etc/nginx/
open /usr/local/Cellar/nginx
查看下nginx.conf 配置信息
cat /usr/local/etc/nginx/nginx.conf
或者使用 sudo open /usr/local/etc/nginx/nginx.conf -a 'sublime text'
使用编辑器sublime打开。
查看信息
brew info nginx