去年的事,随便记记
=========================================================================
2017年3月31日 记录:
nginx的负载均衡:
weight=3的意思是每5个请求,有3个去了187服务器
upstream mail.sina.net {
server 60.28.228.xxx weight=3;
server 60.28.228.xxx;
}
server {
listen 80;
server_name mail.sina.net;
location / {
proxy_pass http://mail.sina.net;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}