使用brew安装nginx brew install nginx 查看nginx信息 brew info nginx 启动nginx brew services start nginx 验证是否启动成功 浏览器输入地址:127.0.0.1:8080 停止服务 brew services stop nginx 进入nginx文件目录 cd /opt/homebrew/etc/nginx 重启服务 brew services restart nginx