环境说明
● centos 7.9
● openresty 1.21.4.1
安装openresty
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