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