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代理服务器研究的整理待续
阅读(1043) | 评论(0) | 转发(0) |