美文网首页
Nginx 基于Mac系统的安装

Nginx 基于Mac系统的安装

作者: faceowener | 来源:发表于2017-08-07 15:50 被阅读0次

1、安装Homebrew,如果还没见过这个,那就是火星人了,安装命令:
terminal ---- >brew install 安装
terminal ---- >brew remove 卸载

2、Nginx 是一个高性能的HTTP和反向代理服务器,也是一个IMAP/POP3/SMTP服务器,且已经开源在Github上面
Clone到本地:git clone https://github.com/nginx/nginx.git
cd -----> nginx (克隆之后进入nginx目录)
执行:brew tap homebrew/nginx
执行:brew install nginx-full
查看是否成功:brew info nginx-full

如果在修改配置文件,重启遇到
[error] open() "/usr/local/var/run/nginx.pid" failed
可以用下面的命令重新加载配置
nginx -c /usr/local/etc/nginx/nginx.conf

3、启动Nginx:terminal----> nginx

4、验证:Safari输入http://localhost:8080

nginx -s stop ( 停止nginx)
nginx -s quit (退出nginx)
nginx -s reload (重新加载配置)
nginx -s reopen (重新打开log)
/usr/local/etc/nginx/nginx.conf (配置文件路径)
/usr/local/var/www (服务器默认路径)
/usr/local/Cellar/ (安装路径)
open -t /usr/local/etc/nginx/nginx.conf 可以用文本编辑器打开配置文件

相关文章

  • Nginx 基于Mac系统的安装

    1、安装Homebrew,如果还没见过这个,那就是火星人了,安装命令:terminal ---- >brew in...

  • Nginx超详细入门!

    本文介绍基于 Linux 系统的 nginx 安装以及简单使用 1、安装 1.1、安装 nginx 依赖的环境 使...

  • nginx 入门

    本文介绍基于 Linux 系统的 nginx 安装以及简单使用 1、安装 1.1、安装 nginx 依赖的环境 使...

  • mac install nginx

    mac install nginx 在mac中安装nginx 安装nginxbrew install nginx ...

  • Nginx环境配置(Mac版)

    在Mac系统下配置Nginx服务器 搜索 安装 安装成功 启动nginx服务器 访问nginx默认页面image....

  • Mac安装nginx

    Nginx安装 Mac环境安装Nginx 安装brew略 安装nginxbrew install nginx安装目...

  • nginx入门学习

    安装nginx mac安装 linux安装 nginx下载地址:https://nginx.org/downloa...

  • 在Mac上自己搭建直播服务器

    在Mac上安装nginx 为什么要在Mac上安装nginx,是因为在nginx上有支持rtmp协议的模块,比较容易...

  • Nginx 安装和配置

    Mac环境安装 用 brew 安装(安装brew) $ brew install nginx 查看 nginx 版...

  • 【nginx安装配置】

    1.CentOS 7上安装Nginx 2.mac上安装Nginx Homebrew安装nginx 安装完以后,可以...

网友评论

      本文标题:Nginx 基于Mac系统的安装

      本文链接:https://www.haomeiwen.com/subject/khhalxtx.html