nginx 前端代理 负载均衡

[color=red][size=large]1.windows情况[/size][/color]
1)下载nginx下载地址:http://sysoev.ru/nginx/nginx-0.8.22.zip
2)解压修改\conf\nginx.conf文件
找到内容server {
在这上面加入如下内容:
upstream xueit.com {
server 127.0.0.1:8888;//两个tomcat一个端口号改为8888一个8080
server 172.0.0.1:8080;
}
3)找到location / {
root html;
index index.html index.htm;
}
把内容更改如下:
location / {
proxy_pass http://xueit.com;
proxy_redirect default;
}
[color=red][size=large]2.linux情况,正式应用可加入负载均衡[/size][/color]
可参考(未亲测):http://hi.baidu.com/snny2008/blog/item/f3b78f95833671187af48074.html
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值