此示例显示了一个同时采用负载平衡和非负载平衡 depot 服务器设置的系统信息库服务器,并给出了需要添加到 httpd.conf 文件的所有指令。
在本示例中,一个域名的两个不同前缀连接到三个不同的软件包系统信息库:
http://pkg.example.com/repo_one 连接到 internal1.example.com:10000 和 internal2.example.com:10000
http://pkg.example.com/repo_two 连接到 internal1.example.com:20000
AddOutputFilterByType DEFLATE text/html application/javascript text/css text/plain AllowEncodedSlashes NoDecode MaxKeepAliveRequests 10000 ProxyTimeout 30 ProxyRequests Off <Proxy balancer://pkg-example-com-repo_one> # depot on internal1 BalancerMember http://internal1.example.com:10000 retry=5 max=100 # depot on internal2 BalancerMember http://internal2.example.com:10000 retry=5 max=100 </Proxy> Redirect /repo_one http://pkg.example.com/repo_one/ ProxyPass /repo_one/ balancer://pkg-example-com-repo_one/ nocanon Redirect /repo_two http://pkg.example.com/repo_two/ ProxyPass /repo_two/ http://internal.example.com:20000/ nocanon max=200