Nginx——mac安装nginx

一、检查c++环境

二、安装brew(mac软件包工具)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

三、安装nginx
brew install nginx 
会自动安装好nginx依赖:
pcre (支持rewrite模块,支持url重写)
openssl (支持ssl模块,支持https)
相关路径如下:
The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that
nginx can run without sudo.

nginx will load all files in /usr/local/etc/nginx/servers/.

To have launchd start nginx now and restart at login:
brew services start nginx
Or, if you don't want/need a background service you can just run:
nginx
==> Summary

猜你喜欢

转载自blog.csdn.net/wx19900503/article/details/80948809