Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1679450
  • 博文数量: 391
  • 博客积分: 8464
  • 博客等级: 中将
  • 技术积分: 4589
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-13 15:12
个人简介

狮子的雄心,骆驼的耐力,孩子的执著!

文章分类

全部博文(391)

文章存档

2023年(4)

2018年(9)

2017年(13)

2016年(18)

2014年(7)

2013年(29)

2012年(61)

2011年(49)

2010年(84)

2009年(95)

2008年(22)

分类: 系统运维

2010-10-18 14:02:09

原文地址:
 
1.下载nginx
cd /usr/local/src/
wget
 
2.下载 NginxHttpUpstreamRequestHashModule
cd /usr/local/src/
 
3.安装
1.)tar xzf nginx-0.7.64.tar.gz
2.)tar xzf Nginx_upstream_hash-0.3.1.tar.gz
3.)cd nginx-0.7.64
4.)patch -p0 < /usr/local/src/nginx_upstream_hash-0.3.1/nginx.patch
5.)./configure --with-http_ssl_module --with-http_gzip_static_module --with-http_dav_module --with-http_realip_module --with-http_stub_status_module --prefix=/usr/local/httpd/ --add-module=/usr/local/src/nginx_upstream_hash-0.3.1/
4.配置
 backend {
     server1;
     server2;
    hash   $request_uri;
}
或者:
 backend {
     server1;
     server2;
    hash   hash $http_cookie;
}
阅读(1602) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~