nginx(mac)

88 阅读1分钟

1.安装nginx

brew install nginx

2.配置nginx

# 通过vscode打开nginx配置
code /usr/local/etc/nginx/nginx.conf

image.png

3.常用命令

- brew services start nginx  // 启动nginx
- nginx -s reload            // 重启
- nginx -s stop              // 关闭
- brew cleanup nginx         // 清缓存
- nginx -h                   // 打开帮助