<Proxy balancer://mycluster>
BalancerMember http://10.164.79.142:8180 route=server1 keepalive=on retry=60
BalancerMember http://10.164.79.143:8380 route=server2 keepalive=on retry=60
Order deny,allow
Allow from all
</Proxy>
如果需要Apache支持TCP类型协议,则需要在“httpd-vhosts.conf”文件最后添加如下配置内容:
Listen port
<VirtualHost *:port>
TCPServerSwitch On
TCPServer 应用A port1
TCPServer 应用B port2
</VirtualHost>
配置内容中配置项请根据表2解释设置各配置项。
配置项 | 描述 | 参数设置 |
port | Apache节点的TCP类型的Listen端口号。 | 例如:8222 |
应用A | 应用A服务器的IP地址。 | 例如:192.168.0.3 |
应用B | 应用B服务器的IP地址。 | 例如:192.168.0.4 |
port1 | 应用A的TCP类型协议端口号。 | 例如:8380 |
port2 | 应用B的TCP类型协议端口号。 | 例如:8480 |