• apache 2.4 配置loadbalance


    apache 中添加如下配置

    <VirtualHost *:9448>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
    RewriteRule .* - [F]
    #ProxyPreserveHost off
    #ProxyRequests off
    #ProxyAddHeaders off
    #SSLProxyEngine on
    #Header unset "X-Forwarded-For"
    #Header unset "X-Forwarded-Server"
    #Header unset "X-Forwarded-Host"
    #SSLProxyVerify none
    #SSLProxyCheckPeerCN off
    #SSLProxyCheckPeerName off
    #SSLProxyCheckPeerExpire off
    #RequestHeader unset "X-Forwarded-For"
    #RequestHeader unset "X-Forwarded-Server"
    #RequestHeader unset "X-Forwarded-Host"
    #RequestHeader unset "Host"
    #SSLEngine On
    SSLCertificateKeyFile /usr/local/aig_sg_tomcat/apache/ssl/server.key
    SSLCertificateFile /usr/local/aig_sg_tomcat/apache/ssl/server.crt
    SSLProtocol -ALL +TLSv1.2
    SSLHonorCipherOrder On
    SSLCipherSuite HIGH:!aNULL:!MD5:!RC4:!EDH:!AES256
    LogLevel warn
    ErrorLog "|/usr/local/aig_sg_tomcat/apache/bin/rotatelogs /usr/local/aig_sg_tomcat/apache/logs/error_9448.%Y%m%d.log 86400 +480"
    ProxyRequests Off
    <Proxy "balancer://cluster">
    BalancerMember "ajp://172.161.281.322:8009" route=tc1 loadfactor=1
    BalancerMember "ajp://172.161.281.322:9009" route=tc2 loadfactor=1
    ProxySet lbmethod=bytraffic stickysession=JSESSIONID|jsessionid scolonpathdelim=on nofailover=on failonstatus=500,501,502,503,504
    </Proxy>

    #ProxyPass "/insurance" "balancer://cluster/insurance" lbmethod=bytraffic stickysession=JSESSIONID|jsessionid nofailover=On scolonpathdelim=on timeout=5 maxattempts=3
    ProxyPass "/insurance/" "balancer://cluster/insurance/"
    ProxyPassReverse /insurance/ http://172.251.161.523:9448/insurance/
    </VirtualHost>
    #Header edit Set-Cookie ^(.*)$ $1;Secure;HttpOnly
    #<filesMatch ".(js|axd|fcc|sfcc|template|pptemplate|properties|unauth|cpp|err|bat|mxml|php|cgi|pl|htm)$">
    # #ExpiresDefault 0
    # Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
    # Header set Pragma "no-cache"
    #</filesMatch>

    tomcat server.xml

     <Engine name="Catalina" defaultHost="localhost" jvmRoute="tc1">

     <Engine name="Catalina" defaultHost="localhost" jvmRoute="tc2">

  • 相关阅读:
    C++常变量
    C++变量(C++变量定义、变量赋值、命名规则)
    463. Island Perimeter
    500. Keyboard Row
    811. Subdomain Visit Count
    901. Online Stock Span
    419. Battleships in a Board
    620. Not Boring Movies
    893. Groups of Special-Equivalent Strings
    575. Distribute Candies
  • 原文地址:https://www.cnblogs.com/Andy-Shi/p/11758771.html
Copyright © 2020-2023  润新知