openresty研究
一、yum安装
sudo yum-config-manager --add-repo https://openresty.org/yum/cn/centos/OpenResty.repo
sudo yum install openresty
如果安装时显示Require GeoIP, 需要先安装geoip后再安装openresty
yum install epel-release
yum --enablerepo=epel install geoip
二、案例:
访问/ 显示hello worldlocation / { default_type text/html; content_by_lua_block { ngx.say("HelloWorld") }
浙公网安备 33010602011771号