openresty安装(centos)
1. 首先安装依赖包 yum install readline-devel pcre-devel openssl-devel gcc GeoIP-devel 2.下载最新源码 wget https://openresty.org/download/openresty-1.19.9.1.tar.gz 3.解压 tar -xzvf openresty-1.19.9.1.tar.gz 4.进入目录配置 cd openresty-1.19.9.1 ./configure
时间:2023-09-18  |  阅读:19
openresty 操作memcached例子
/test2{set $memc_cmd "get";set $memc_key "name";memc_pass 127.0.0.1 11211; } 注意点: $memc_cmd 设置请求方法 get$memc_key 设置请求参数 “name"memc_pass 设置为memcached的路径,不能加http:// 否则报错
时间:2023-09-18  |  阅读:15
openresty之http
使用过程 1.下载resty.http 库2.将lib/resty文件夹下的http.lua 和http_headers.lua两个文件复制到 openresty的lualib/resty 目录下 常见报错 1. no resolver defined to resolve 解决办法 在location标签下添加 resolver 8.8.8.8; 2. unable to get local issuer certificat
时间:2023-09-18  |  阅读:15
解决openresty http客户端不支持https的问题
OpenResty默认没有提供Http客户端,需要使用第三方提供;当然我们可以通过ngx.location.capture 去方式实现,但它只能发送一个子请求。 第三方基本是以lua-resty-http为代表,这个类库如果去访问http和正规的https是没有问题,也挺好用的ÿ
时间:2023-09-10  |  阅读:10

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 匯編語言學習筆記 Inc. 保留所有权利。

底部版权信息