搭建一个apache集群,开始使用的是worker.properties的方式搭建的,总出现
[Thu Jan 18 16:12:06.625664 2018] [ssl:warn] [pid 6596:tid 260] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Thu Jan 18 16:12:06.625664 2018] [jk:emerg] [pid 6596:tid 260] Error in reading worker properties from 'C:/Apache24/conf/workers.properties'
这种错误,弄了半天没弄好,就用反向代理去搭建,终于弄好了
下面是我的配置httpd.conf
<IfModule proxy_balancer_module>
# define a Load Balance Proxy based HTTP protocol
<IfModule proxy_http_module>
<Proxy balancer://myHttpLB>
BalancerMember http://localhost:8080/max loadfactor=50 route=worker1
BalancerMember http://localhost:17070/max loadfactor=50 route=worker2
</Proxy>
ProxyRequests off
ProxyPass /max balancer://myHttpLB/ stickySession=JSESSIONID nofailover=Off
ProxyPassReverse /max balancer://myHttpLB/
</IfModule>
# define a Load Balance Proxy based AJP protocol
<IfModule proxy_ajp_module>
<Proxy balancer://myAjpLB>
BalancerMember ajp://localhost:8080/examples loadfactor=50 route=worker1
BalancerMember ajp://localhost:17070/examples loadfactor=50 route=worker2
</Proxy>
ProxyRequests off
ProxyPass /max balancer://myAjpLB/ stickySession=JSESSIONID nofailover=Off
ProxyPassReverse /max balancer://myAjpLB/
</IfModule>
</IfModule>
httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin mail@qq.com
ServerName localhost
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /max http://127.0.0.1:8080/
ProxyPassReverse /max http://127.0.0.1:8080/
ErrorLog "logs/lbtest-error.log"
CustomLog "logs/lbtest-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin mail@qq.com
ServerName localhost
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /max http://127.0.0.1:17070/
ProxyPassReverse /max http://127.0.0.1:17070/
ErrorLog "logs/lbtest-error.log"
CustomLog "logs/lbtest-access.log" common
</VirtualHost>
下面是借鉴的大神的链接
http://blog.csdn.net/sunhuwh/article/details/48215831
http://blog.csdn.net/jacklondon/article/details/1194992
https://www.cnblogs.com/f1194361820/p/5110956.html