zoukankan      html  css  js  c++  java
  • 主机头部分 www有和无是有区别的

    关于主机部分www的问题:
    
    case 1:
    
    frontend web_service
    	bind	*:80
    	bind	*:443	ssl	crt	/etc/haproxy/cert.pem
    
          acl wwwpod100_com  hdr_beg(host)  -i zjtest7.com
           use_backend wwwpod100_com if wwwpod100_com  
           backend wwwpod100_com
           mode    	http
           server  	apphost_1		192.168.32.101:3000  	check inter 2000 fall 3
    
    
    mojo 接口:
     get '/scan/test' => sub {
              my $c = shift;
    
              $c->render(text =>  "welcome wxpod999" );
    };
    
    
    zjtest7-haproxy:/etc/haproxy# curl http://zjtest7.com/scan/test
    welcome wxpod999zjtest7-haproxy:/etc/haproxy# 
    zjtest7-haproxy:/etc/haproxy# 
    zjtest7-haproxy:/etc/haproxy# curl zjtest7.com/scan/test
    welcome wxpod999zjtest7-haproxy:/etc/haproxy# 
    
    
    加上www呢?
    
    zjtest7-haproxy:/etc/haproxy# curl www.zjtest7.com/scan/test
    <html><body><h1>503 Service Unavailable</h1>
    No server is available to handle this request.
    </body></html>
    
    
    此时请求不到
    
    
    case 2:
          acl wwwpod100_com  hdr_beg(host)  -i www.zjtest7.com
           use_backend wwwpod100_com if wwwpod100_com  
           backend wwwpod100_com
           mode    	http
           server  	apphost_1		192.168.32.101:3000  	check inter 2000 fall 3
    	   
    
    zjtest7-haproxy:/etc/haproxy# curl http://zjtest7.com/scan/test
    <html><body><h1>503 Service Unavailable</h1>
    No server is available to handle this request.
    </body></html>
    zjtest7-haproxy:/etc/haproxy# curl zjtest7.com/scan/test
    <html><body><h1>503 Service Unavailable</h1>
    No server is available to handle this request.
    </body></html>
    
    zjtest7-haproxy:/etc/haproxy# curl www.zjtest7.com/scan/test
    welcome wxpod999zjtest7-haproxy:/etc/haproxy# 
    
    此时必须加上www才行

  • 相关阅读:
    2020CCPC秦皇岛 K 【Kindom's Power】(树上贪心dp)
    对于树上状态机dp问题的一些总结与思考
    PTA_L3题解集
    PTA_L2题解集
    树上dp_学习笔记
    2020牛客国庆集训派对day2 B【Cheap Delivers】(最短路+状压dp)
    2020牛客国庆集训派对day1
    Codeforces 1426F【Number of Subsequences】(dp)
    2019icpc陕西省赛
    CF1281E【Jeremy Bearimy】(树上点对最大值/最小值和)
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13349968.html
Copyright © 2011-2022 走看看