apache2.4和tomcat7使用ajp配置负载均衡怎么做呢
一台服务器上有多个项目(模拟了两个),要求使用ajp配置成负载均衡的模式,麻烦各位前辈帮忙看看这个配置对吗
<VirtualHost *:80>
DocumentRoot /data/yey_tomcat/tomcat_wmf/wmf/wmf
ServerAdmin webmaster@hwazhan.com
ServerName hwazhan.com
ServerAlias wmf1.hwazhan.com
DirectoryIndex index.html index.htm index.php index.shtml index.shtm index.pl
ProxyPassMatch /*.gif !
ProxyPassMatch /*.jpg !
ProxyPassMatch /*.png !
ProxyPassMatch /*.css !
ProxyPassMatch /*.js$ !
ProxyPass / balancer://cluster/ stickysession=jsessionid nofailover=on
ProxyPassReverse / balancer://cluster
<proxy balancer://cluster>
BalancerMember ajp://127.0.0.1:9401 loadfactory=1 route=wmf1
BalancerMember ajp://127.0.0.1:9402 loadfactory=1 route=wmf2
</proxy>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot /data/yey_tomcat/tomcat_wmf2/wmf2/wmf2
ServerAdmin webmaster@hwazhan.com
ServerName hwazhan.com
ServerAlias wmf2.hwazhan.com
DirectoryIndex index.html index.htm index.php index.shtml index.shtm index.pl
ProxyPassMatch /*.gif !
ProxyPassMatch /*.jpg !
ProxyPassMatch /*.png !
ProxyPassMatch /*.css !
ProxyPassMatch /*.js$ !
ProxyPass / balancer://cluster/ stickysession=jsessionid nofailover=on
ProxyPassReverse / balancer://cluster
<proxy balancer://cluster>
BalancerMember ajp://127.0.0.1:9401 loadfactory=1 route=wmf1
BalancerMember ajp://127.0.0.1:9402 loadfactory=1 route=wmf2
</proxy>
</VirtualHost>
#-----------end---------------
启动的时候报错
Redirecting to /bin/systemctl restart httpd.service
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.
是报语法错误
<proxy balancer://cluster>
BalancerMember ajp://127.0.0.1:9401 loadfactory=1 route=wmf1(这一行报错)
BalancerMember ajp://127.0.0.1:9402 loadfactory=1 route=wmf2
</proxy>
##报错信息
-- Unit httpd.service has begun starting up.
Jul 17 11:07:43 izwz97ym5r82qou1xvce3mz httpd[32519]: AH00526: Syntax error on line 370 of /etc/httpd/conf/httpd.conf:
Jul 17 11:07:43 izwz97ym5r82qou1xvce3mz httpd[32519]: BalancerMember unknown Worker parameter
Jul 17 11:07:43 izwz97ym5r82qou1xvce3mz systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 17 11:07:43 izwz97ym5r82qou1xvce3mz kill[32520]: kill: cannot find process ""
Jul 17 11:07:43 izwz97ym5r82qou1xvce3mz systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 17 11:07:43 izwz97ym5r82qou1xvce3mz systemd[1]: Failed to start The Apache HTTP Server.
#end
是我的配置里面缺少了什么模块吗,我是用的阿里云的centos7.2的服务器,apache是直接通过yum安装的,里面的模块应该都是通过这一行已经加载了Include conf.modules.d/*.conf,如果是需要安装什么模块,麻烦告知一下怎么装,yum安装的apache,没有找到目录。。。所以也不知道去哪里编译那些.so的模块文件
请有经验的前辈帮忙看看,谢谢