nginx lua 开发笔记
2016-04-18 15:39
399 查看
获取 在lua代码中获取 location 正则的参数对应的变量
// location location ~/lua_http_2/(\w*.+) { } // lua local vars=ngx.var; // 数组中存的是 location 参数值 local url="/zhuanfa/"..vars[1]; local resp = ngx.location.capture(url, { method = ngx.HTTP_GET, body = body, args = {q="info.php"} }) if resp.body then ngx.say(resp.body); end
网页显示输出
default_type 'text/html'; 表示在网页中输出 html ;如果没有 程序执行会下载文件相关文章推荐
- 【转载】最完美解决Nginx部署ThinkPHP项目的办法
- 安装nginx第三方模块
- nginx安装-源码编译
- nginx配置文件
- Nginx 入门配置
- Nginx的upstream目前支持5种方式的分配
- 伟哥教您Windows下手动搭建Laravel5.2开发环境Nginx+Php+MySQL
- nginx+gunicorn+supervisor+flask @ centos
- 深入理解PHP之:Nginx 与 FPM 的工作机制
- Nginx+Resin实现高性能JAVA平台搭建
- lvs、haproxy、nginx 负载均衡的比较分析
- nginx 一二事(2) - 创建虚拟静态服务器
- keepalived,nginx做HA
- keepalived nginx 双机热备图文讲解
- CentOS 7下编译安装 nginx1.9.14
- CentOS 7下编译安装 nginx1.9.14
- nginx优化
- nginx详解
- Nginx负载均衡配置实例详解(转)
- nginx负载均衡器处理session共享的几种方法(转)