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 world
location / { default_type text/html; content_by_lua_block { ngx.say("HelloWorld") }


 

 
posted @ 2017-05-11 16:41  有肉的三明治  阅读(80)  评论(0)    收藏  举报