nginx根据cookie分发
来源:互联网 发布:数组slice方法 编辑:程序博客网 时间:2024/05/17 00:07
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
set $target 'unknown';
if ( $http_cookie ~* "target=(.*)$")
{
set $target $1;
}
if ($domain ~ "target1")
{
proxy_pass http://target1;
break;
}
if ($domain ~ "target2")
{
proxy_pass http://target2;
break;
}
proxy_pass http://dfeualt;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
set $target 'unknown';
if ( $http_cookie ~* "target=(.*)$")
{
set $target $1;
}
if ($domain ~ "target1")
{
proxy_pass http://target1;
break;
}
if ($domain ~ "target2")
{
proxy_pass http://target2;
break;
}
proxy_pass http://dfeualt;
}
- nginx根据cookie分发
- nginx根据cookie分流
- nginx根据$remote_addr分发 nginx根据客户端IP分发
- nginx根据$remote_addr分发 (客户端IP)
- nginx 根据不同URL分发到不同服务器
- Nginx实现根据域名http、https分发配置示例
- nginx负载分发,cookie滞粘策略配置,sticky第三方模块追加
- nginx 负载分发安装
- Nginx分发配置
- python 抓取, 根据cookie
- nginx做图片访问分发
- nginx 分发 tomcat集群 问题
- nginx url分发 特别说明
- Nginx 记录请求分发日志
- Nginx 安装与端口分发
- Nginx 记录请求分发日志
- nginx及tcp代理分发
- JavaScript根据Cookie名称获取Cookie值
- C# Winform 如何获得窗体上控件相对于屏幕的位置
- SoftEther
- eclipse常用插件
- 程序设计竞赛ACM训练手册--从入门到精通
- Android腾讯微薄客户端
- nginx根据cookie分发
- C++中的地雷
- 空指针异常总结
- Python 的函数定义1
- Blog改版不错
- 80386控制寄存器
- Oracle11gR2官方下载列表
- 互联网公司创业的7道槛
- FastReport 创建“人民币大小写转换”自定义函数