server {
listen 443 ssl;
server_name production.ci.jfrog.com;
location /crowd {
proxy_pass https://crowd-server.com;
.........................
}
location /ui {
proxy_read_timeout 2400s;
proxy_pass_header Server;
proxy_cookie_path ~*^/.* /;
proxy_buffer_size 128k;
proxy_buffers 40 128k;
proxy_busy_buffers_size 128k;
proxy_pass https://artifactory-server.com;
proxy_set_header X-JFrog-Override-Base-Url $http_x_forwarded_proto://$host:$server_port;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
.....................
}
After the above configuration, if we access https://production.ci.jfrog.com/crow we will see the login page of crowd application, once login to crowd application and hit the https://production.ci.jfrog.com/ui URL in the next tag then the Artifactory application will log in automatically, as crowd.token_key will be shared with both URLs in the browser.