关于NGINX变量的一些测试结果
2014-11-11 14:32
309 查看
作为NGINX变量,不像正规语言那么正式。
但处理自定义和内部变量时,这些操作,也是少不了的。
但处理自定义和内部变量时,这些操作,也是少不了的。
geo $dollar { default "$"; } server { listen 8080; location /test { set $foo chengang; set $first "hello "; echo "${first}world"; echo "foo: $foo"; echo "this is a dollar sign:$dollar"; } location /bad { set $bar "nginx"; echo $bar; } location /foo { set $a hello; echo "$foot = [$foot]"; echo_exec /bar; } location /bar { set $foot 32; echo "foot = [$foot]"; echo "a = [$a]"; } } server { listen 8080; location /test { echo "uri = $uri"; echo "request_uri = $request_uri"; echo "name: $arg_name"; echo "class: $arg_class"; set $orig_args $args; set $args "a=3&b=4"; echo "original args: $orig_args"; echo "args: $args"; } } server { listen 8080; location /test { set $args "foo=1&bar=2"; proxy_pass http://127.0.0.1:8081/args; } } server { listen 8081; location /args { echo "args: $args"; } }
相关文章推荐
- 关于Apache,Nginx 的一些测试
- 关于变量初始化的一些测试
- 关于使用初始化块初始化变量的几种情况的运行结果分析
- 关于大端小端和移位的一些测试
- 关于侯垒的自增字段和GUID字段性能对比文章的一些自己的分析(没有测试,纯粹分析)
- 《完美软件》笔记:1)关于测试的一些问题
- c# 中关于static 变量和构造函数的几个测试
- 关于异步事件的一个测试及其分析结果
- 一些关于测试的问题
- 关于SHELL中一些特殊的$打头的特殊变量
- 关于ADSL信噪比的问题的测试结果
- 关于软件测试的一些技巧
- 关于RDA的Push和Pull方法多种情况的测试结果
- 关于测试的一些基本概念
- 关于软件测试的一些基本知识
- 网上关于测试优先级文章的一些节选
- 国外关于测试的一些站点(转载)
- 关于对sql2000查询结果进行相关度排序的测试
- 关于windows环境下配置nginx的一些疑问
- 关于测试的一些需求和方向