本来想着在mac上,基于install nginx上安装nginx_lua,无奈没有找到破解方法
于是在mac上通过openresty来测试nginx lua
安装很简单
brew update
brew install openresty/brew/openresty
openresty -V # 检查版本及支持模块
默认openresty 下 nginx配置文件
/usr/local/etc/openresty/nginx.conf
## 添加测试代码
location /hello_lua {
default_type 'text/plain';
content_by_lua 'ngx.say("hello, lua")';
}
测试访问,看lua是否工作
curl localhost:80/hello_lua