1、安装遇到的问题
安装配置nginx时,使用brew install nginx的方法安装,sudo nginx启动时报错,缺少echo-module;echo_location_async命令一直卡着;
搜索了一圈,把nginx卸载,然后使用brew install nginx-full
重新安装了一遍;
如果再报错,处理方法:
brew tap denji/nginx
brew reinstall nginx-full —with-echo-module
2、记录nginx使用
进入到nginx安装目录:
shift + comman + G
/usr/local/etc/nginx/
查看版本
nginx -v
启动
sudo nginx
修改配置文件之后重启nginx
sudo nginx -s stop
sudo nginx
// or
sudo nginx -s reload
之前也有整理了下nginx内容,主要是使用nginx将资源代理到本地,有需求可以看这篇文章:
本地调试 之 Nginx配置文件学习以及本地指向步骤