Mac下安装nginx

试图折腾了一下手动安装,太多依赖,繁琐的要死.只好装了一个homebrew , 具体安装homebrew的教程网上查吧,就是一句话(ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)")

装好homebrew后

在命令行里执行

brew search nginx

然后可以看到有nginx的结果,之后安装nginx

brew install nginx

 此时在shell中输入"nginx" , 就可以在localhost:8080访问nginx了.

 修改nginx的配置 :

vim /usr/local/etc/nginx/nginx.conf
原文地址:https://www.cnblogs.com/taojintianxia/p/5960770.html