} http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; upstream upload_pools { server 10.0.0.8:80; } upstream static_pools { server 10.0.0.7:80; } upstream default_pools { server 10.0.0.9:80; } server { listen 80; server_name www.etiantian.org; location / { if ($http_user_agent ~* "MSIE") { proxy_pass http://static_pools; } if ($http_user_agent ~* "Chrome") { proxy_pass http://upload_pools; } proxy_pass http://default_pools; proxy_set_header Host $host; } access_log logs/access_www.log main; } } 1.7.3 进行测试
基于上一步的操作,如今可以之间的进行拜访测试
curl -A 指定拜访类型
- [root@lb01 conf]# curl -A MSIE -H host:www.etiantian.org 10.0.0.5
推荐阅读
因Python微软和亚马逊再次联手推出人工智能软件,谷歌靠边站
两家公司要联手推出闪开辟者更轻易的应用开源人工智能软件据媒体报道,比来几个月以来,亚马逊和微软已经第二次联手开辟人工智能技巧了,而谷歌今朝依然还处于不雅望状况。两家公司联手推>>>详细阅读
本文标题:Nginx的反向代理与负载均衡
地址:http://www.17bianji.com/lsqh/39883.html
1/2 1