环境说明
- centos 7.9
- openresty 1.21.4.1
安装openresty
参考:centos7.9安装openresty_黄娟0229的博客-CSDN博客
nginx配置
location /lua {
default_type text/html;
content_by_lua '
ngx.say("<p>Hello world</p>")
';
}
重启nginx
# 测试配置文件是否正确
/usr/local/openresty/nginx/sbin/nginx -t
# 重启nginx
/usr/local/openresty/nginx/sbin/nginx -s reload