集積サーバーをプロキシの背後で実行するもっとも重要な理由は、1 つのドメイン名において異なるプレフィックスを使用して複数のリポジトリを簡単に実行することです。プレフィックスを使用した単純なプロキシの構成の例は、複数のリポジトリをサポートするように簡単に拡張できます。
次の例では、1 つのドメイン名の 3 種類のプレフィックスが 3 種類のパッケージリポジトリに接続されます。
http://pkg.example.com/repo_one は internal.example.com:10000 に接続されます
http://pkg.example.com/repo_two は internal.example.com:20000 に接続されます
http://pkg.example.com/xyz/repo_three は internal.example.com:30000 に接続されます
pkg(5) 集積サーバーは SMF 管理対象サービスです。したがって、同じホスト上で複数の集積サーバーを実行するには、単純に新しいサービスインスタンスを作成します。
$ svccfg -s pkg/server add repo1 $ svccfg -s pkg/server:repo1 setprop pkg/property=value $ ...
前の例と同様、各集積サーバーは 200 個のスレッドを実行します。
Redirect /repo_one http://pkg.example.com/repo_one/ ProxyPass /repo_one/ http://internal.example.com:10000/ nocanon max=200 Redirect /repo_two http://pkg.example.com/repo_two/ ProxyPass /repo_two/ http://internal.example.com:20000/ nocanon max=200 Redirect /xyz/repo_three http://pkg.example.com/xyz/repo_three/ ProxyPass /xyz/repo_three/ http://internal.example.com:30000/ nocanon max=200