Mac Nginx服务器搭建

**1.使用Homebrew安装Nginx**

1
brew install nginx

出现mkdir: /usr/local/var/log/nginx: Permission denied问题

1
2
3
sudo chown -R "$USER":admin /usr/local

sudo chown -R "$USER":admin /Library/Caches/Homebrew

http://stackoverflow.com/questions/16432071/how-to-fix-homebrew-permissions

2.启动Nginx

1
nginx

然后在浏览器里输入localhost:8080,回车,出现welcome to nginx,说明成功

相关

安装Homebrew

1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
文章作者: kyren
文章链接: http://huluo666.github.io/2017/02/03/Mac Nginx服务器搭建/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Kyren's Blog