作家
登录

使用Nginx搭建高可用,高并发的WCF集群

作者: 来源: 2017-11-13 13:07:08 阅读 我要评论

  •     keepalive_timeout  65; 
  •  
  •     #gzip  on
  •  
  •     upstream  cluster.com{ 
  •                  server 192.168.23.187:8733 weight=1; 
  •                  server 192.168.23.188:8733 weight=5; 
  •                  } 
  •  
  •     server { 
  •         listen       80; 
  •         server_name  localhost; 
  •  
  •         #charset koi8-r; 
  •  
  •         #access_log  logs/host.access.log  main; 
  •  
  •         location / { 
  •             root   html; 
  •             index  index.html index.htm; 
  •             proxy_pass http://cluster.com;  
  •             #设置主机头和客户端真实地址,以便办事器获取客户端真实IP 
  •             proxy_set_header X-Forwarded-Host $host; 
  •             proxy_set_header X-Forwarded-Server $host; 
  •             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
  •             proxy_set_header  X-Real-IP  $remote_addr;  
  •         } 
  •  
  •         #error_page  404              /404.html; 
  •  
  •         # redirect server error pages to the static page /50x.html 
  •         # 
  •         error_page   500 502 503 504  /50x.html; 
  •         location = /50x.html { 
  •             root   html; 
  •         } 
  •  
  •         # proxy the PHP scripts to Apache listening on 127.0.0.1:80 
  •         # 
  •         #location ~ \.php$ { 
  •         #    proxy_pass   http://127.0.0.1; 

      推荐阅读

      如何避繁就简为数据中心减负

    Tech Neo技巧沙龙 | 11月25号,九州云/ZStack与您一路商量云时代收集界线治理实践 跟着人们对信息数据应用的处>>>详细阅读


    本文标题:使用Nginx搭建高可用,高并发的WCF集群

    地址:http://www.17bianji.com/lsqh/38778.html

  • 关键词: 探索发现

    乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

    网友点评
    自媒体专栏

    评论

    热度

    精彩导读
    栏目ID=71的表不存在(操作类型=0)