标签:head 机器 ddr real-ip pst nginx eal conf ref
代理一台机器叫代理,代理多台机器,叫负载均衡。vim /usr/local/nginx/conf/vhost/load.conf // 写入如下内容
upstream qq_com
{
ip_hash;
server 61.135.157.156:80;
server 125.39.240.113:80;
}
server
{
listen 80;
server_name www.qq.com;
location /
{
proxy_pass http://qq_com;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
标签:head 机器 ddr real-ip pst nginx eal conf ref
原文地址:http://blog.51cto.com/13451715/2324063