安装
确认mac已经安装了brew命令,如果没有就先安装brew,安装命令如下:
curl -LsSf http://github.com/mxcl/homebrew/tarball/master | sudo tar xvz -C/usr/local --strip 1
brew search nginx
brew install nginx
启动nginx,输入如下命令
nginx 或者 sudo nginx
访问localhost:8080,看到nginx欢迎界面
nginx常用命令:
ginx -V 查看版本,以及配置文件地址
nginx -v 查看版本
nginx -c filename 指定配置文件
nginx -h 帮助
nginx -t 测试nginx配置是否有语法错误
配置一个IP地址对应多个域名
comming soon
负载均衡配置
comming soon
转载于:https://blog.51cto.com/11810878/1831489