Apache 负载平衡无法正常工作 mod_jk

Apache Loadbalancing not working viya mod_jk

尝试在 Windows 10 上通过 xampp 使用 apache 2.4 配置负载平衡。

My workers.proprties

worker.list=balancer,stat

worker.instance01.type=ajp13
worker.instance01.host=localhost
worker.instance01.port=8111
worker.instance01.lbfactor=10

worker.instance02.type=ajp13
worker.instance02.host=localhost
worker.instance02.port=8112
worker.instance02.lbfactor=10

worker.instance03.type=ajp13
worker.instance03.host=localhost
worker.instance03.port=8113
worker.instance03.lbfactor=10

worker.balancer.type=lb
worker.balancer.balancer_workers=instance01,instance02,instance03

worker.stat.type=status

my httpd.conf

[...]
    AcceptFilter http none
    AcceptFilter https none
    # AJP13 Proxy
    #<IfModule mod_proxy.c>
    #<IfModule mod_proxy_ajp.c>
    #Include "conf/extra/httpd-ajp.conf"
    #</IfModule>
    #</IfModule>
    
        LoadModule jk_module modules/mod_jk.so
        
        JkWorkersFile conf/workers.properties
        
        JkLogFile logs/mod_jk.log
        JkLogLevel emerg
        JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
        JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
        JkRequestLogFormat "%w %V %T"
        
        JkMount / balancer
        JkMount /status stat

apache error.log

    [Sat Aug 08 23:46:06.681796 2020] [jk:emerg] [pid 17136:tid 600] Error in reading worker properties from 'C:/xampp/apache/conf/workers.properties'
AH00016: Configuration Failed

no entries in mod_jk.log

模块 mod_jk.so 位于模块中,它应该如此。

谁能帮帮我?

您需要更改以下行。

发件人:

worker.balancer.balancer_workers=instance01,instance02,instance03

至:

worker.balancer.balance_workers=instance01,instance02,instance03