この例は、負荷分散に対応した集積サーバーおよび負荷分散に対応しない集積サーバーの設定をホストするリポジトリサーバーのために、httpd.conf ファイルに追加する必要があるすべてのディレクティブを含んでいます。
次の例では、1 つのドメイン名の 2 種類のプレフィックスが 3 種類のパッケージリポジトリに接続されます。
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