Apache HTTP configuration with SSL and Docker V1/V2 on HA

JFrog Support
2016-10-06 13:35

Here is a Apache HTTP server configuration sample that has the following things enabled:

  2. Docker V2 and V2 endpoints
  3. Load balancing for HA
  4. Sticky Sessions
  5. Redirecting the root of the Load Balancer to the /artifactory context

In Artifactory you would set your Custom URL Base to the proxy server's URL. The only things in the config that you really need to change are…

  1. The two hostnames:ports in the BalancerMembers 
    # Artifactory server #1
    BalancerMember http://nfs_artifactory_1:8081 route=art1
    # Artifactory server #2
    BalancerMember http://nfs_artifactory_1:8081 route=art2
  2. The files in the SSL section:
    SSLCertificateFile      /etc/ssl/certs/demo.pem
    SSLCertificateKeyFile   /etc/ssl/private/demo.key
  3. The repository keys in the ProxyPass and ProxyReversePass sections:
    ProxyPass         /v1 balancer://tomcats/artifactory/api/docker/docker-dev-local/v1
    ProxyPassReverse  /v1 balancer://tomcats/artifactory/api/docker/docker-dev-local/v1
    ProxyPass         /v2 balancer://tomcats/artifactory/api/docker/docker-dev-local2/v2
    ProxyPassReverse  /v2 balancer://tomcats/artifactory/api/docker/docker-dev-local2/v2