ARTIFACTORY: Disable the artifactory /ui/login page

ARTIFACTORY: Disable the artifactory /ui/login page

Products
Frog_Artifactory
Content Type
Administration_Platform
AuthorFullName__c
Ruilin Fan
articleNumber
000006483
FirstPublishedDate
2025-06-23T11:05:49Z
lastModifiedDate
2025-06-23
VersionNumber
1
Introduction 

When users use SSO to login and access Artifactory portal, they want to disable the **/ui/login page to avoid being accessed to login by illegal users.

In other word, disable the below page to make it cannot be accessed;

User-added image 

Resolution 

There is using nginx proxy server to redirect to main url when accessing **/ui/login;
Add the below configuration into server block of nginx.conf;
server {
       if ($http_cookie ~* "REFRESHTOKEN=([\w-]+?)(?=;|$)") {
           set $JSESSIONID_TOKEN "$1";
       }
       if ( $request_uri ~ ^/ui/login/ ){
            set $condition 'a';
        }
        if ($JSESSIONID_TOKEN = '') {
            set $condition "${condition}b";
        }
        if ($http_authorization = '') {
            set $condition "${condition}c";
        }
        if ($condition = 'abc'){
            rewrite ^/*  https://myserver.domian        
        }
}
That’s to redirect to main URl(https://myserver.domian) after judging if access **/ui/login and without token and authentication info, and access to the main URL will redirect to the SSO login page and directly access the artifactory.