Understanding proxy configuration and how to debug

ARTIFACTORY: How to debug docker configuration issues

AuthorFullName__c
Scott Mosher
articleNumber
000005318
ft:sourceType
Salesforce
FirstPublishedDate
2022-06-23T09:15:17Z
lastModifiedDate
2022-06-23
VersionNumber
3
We will take a generic nginx reverse proxy configuration as this or Apache would be used when setting up the sub-domain Docker method. The necessary configuration that is required is to set the servername and rewrite.

server_name ~(?<repo>.+)\.PLATFORM_URL PLATFORM_URL;
rewrite ^/(v1|v2)/(.*) /artifactory/api/docker/$repo/$1/$2; 

This takes the repository provided in the subdomain to construct the request as Artifactory expects. We can also look to the headers we set if we continue to see issues.

proxy_set_header    X-Forwarded-Port  $server_port;
proxy_set_header    X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header    Host              $http_host;

The POST commands above will take the header set within the request and push the PATCH requests to this location. If we see the POST commands hit Artifactory as expected, but the PATCH requests are failing, this usually is a result of an invalid header.