Comments:

How to configure a reverse proxy for Artifactory Docker repository when using AWS-ELB load balancer?

AuthorFullName__c
JFrog Support
articleNumber
000002818
ft:sourceType
Salesforce
FirstPublishedDate
2016-11-21T15:16:04Z
lastModifiedDate
2024-03-10T07:48:55Z
VersionNumber
7

The most important part of this configuration is in the if statements.

Its main purpose is to keep the protocol of the requests which come through the load balancer (in case it is http or if it is https).

if ($http_x_forwarded_proto != "https") {

        rewrite ^/artifactory/webapp/(.*) https://$host/artifactory/webapp/$1 redirect;

        rewrite ^/$ $scheme://$host/artifactory/webapp/#/home redirect;

    }

    if ($http_x_forwarded_proto = "https") {

        rewrite ^/$ https://$host/artifactory/webapp/#/home redirect;

    } 

 

Please note that the rewrite rules also specify the full path of the redirection along with keeping the protocol.

The rewrite rule for the docker repository has not changed from the auth generator configuration file.

For this example, we used a v2 api repository.

In this case, requests which have the pattern of '/v2/' will be redirected to the docker repository.