本文共 405 字,大约阅读时间需要 1 分钟。
代理一台机器叫代理,代理多台机器,叫负载均衡。
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 ;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;}}转载于:https://blog.51cto.com/13451715/2324063