The most important reason to run the depot server behind a proxy is to easily run several repositories under one domain name with different prefixes. The example from Configuring a Simple Prefixed Proxy can be easily extended to support multiple repositories.
In this example, three different prefixes of one domain name are connected to three different package repositories:
http://pkg.example.com/repo_one is connected to internal.example.com:10000
http://pkg.example.com/repo_two is connected to internal.example.com:20000
http://pkg.example.com/xyz/repo_three is connected to internal.example.com:30000
The pkg(5) depot server is an SMF managed service. Therefore, to run multiple depot servers on the same host, simply create a new service instance:
$ svccfg -s pkg/server add repo1 $ svccfg -s pkg/server:repo1 setprop pkg/property=value $ ...
Like the previous example, each depot server runs with 200 threads.
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