<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 |