IT博客汇
  • 首页
  • 精华
  • 技术
  • 设计
  • 资讯
  • 扯淡
  • 权利声明
  • 登录 注册

    mac 快速使用 nginx

    血衫非弧の一存发表于 2023-12-25 00:00:00
    love 0

    安装

    brew install nginx
    

    image-20231226085242585

    配置文件

    /opt/homebrew/etc/nginx/nginx.conf
    

    配置设置和常用的nginx是一样的。默认的目录和文件:

    brew info nginx
    

    image-20231226100551078

    虽然 homebrew 已经安装nginx成功了。但是 nginx并未被正确安装到Homebrew的默认目录,brew services 可能无法找到正确的安装路径而报错。

    image-20231226100814580

    常用命令

    image-20231226102045020

    brew services reload nginx
    brew services start nginx
    brew services stop nginx
    

    image-20231226102556460

    image-20231226102150606

    参考资料

    • How to Install Nginx on macOS


沪ICP备19023445号-2号
友情链接