1、打开终端,习惯性命令:
brew update
brew search nginx //查询要安装的软件是否存在
brew info nginx //查看安装信息
brew install nginx //安装
open /usr/local/etc/nginx/
发现只有配置文件,没有bin目录
open /usr/local/Cellar/nginx //其实这个才是nginx被安装到的目录
Dcroot
进入bin目录 启动nginx
访问: http://localhost:8080/