Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1024604
  • 博文数量: 157
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 1388
  • 用 户 组: 普通用户
  • 注册时间: 2015-04-09 15:37
文章分类

全部博文(157)

文章存档

2023年(9)

2022年(2)

2021年(18)

2020年(7)

2017年(13)

2016年(53)

2015年(55)

我的朋友

分类: 服务器与存储

2015-12-17 16:14:46

nginx.config中的配置:
http {
    
    upstream loadbancetest{
            server 192.168.10.89:8080;
            server 192.168.10.75:83;
             }
   server{
         listen 85;
         location / {
                proxy_pass http://loadbancetest;
                 }
         }

发送:wget -e http_proxy=192.168.10.74:85 -S
下面是nginx代理服务器和http源交互的抓包内容如下,且请求在两个server间轮询访问
GET /test.ts HTTP/1.0
Host: loadbancetest
Connection: close
User-Agent: Wget/1.12 (linux-gnu)
Accept: */*

HTTP/1.1 404 Not Found
Server: nginx/1.7.11
Date: Wed, 16 Dec 2015 09:42:46 GMT
Content-Type: text/html
Content-Length: 169
Connection: close


更复杂的nginx负载均衡及nginx代理服务器研究的整理待续


阅读(1012) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~