Change the login and logout URLs for Jira server

Still need help?

The Atlassian Community is here for you.

Ask the community


Customizations of seraph-config.xml are not covered under the Atlassian Support Offerings.


If you require assistance with such customizations, please reach out to Atlassian Community or to an Atlassian Partner.

Steps to Change JIRA applications login and logout URL

In order to change the login and logout URL, you can change them in seraph-config.xml:

  1. Open seraph-config.xml file located in $JIRAINSTALL/atlassian-jira/WEB-INF/classes directory
  2. You will find the following parameters where you can update them accordingly

            <init-param>
                <!--
                  The login URL to redirect to when the user tries to access a protected resource (rather than clicking on
                  an explicit login link). Most of the time, this will be the same value as 'link.login.url'.
                    - if the URL is absolute (contains '://'), then redirect that URL (for SSO applications)
                    - else the context path will be prepended to this URL
                    If '${originalurl}' is present in the URL, it will be replaced with the URL that the user requested.
                    This gives SSO login pages the chance to redirect to the original page
                -->
                <param-name>login.url</param-name>
                <param-value>/login.jsp?permissionViolation=true&amp;os_destination=${originalurl}</param-value>
                <!--<param-value>http://sso.mycompany.com/login?redirectTo=${originalurl}</param-value>-->
            </init-param>
            <init-param>
                <!--
                  the URL to redirect to when the user explicitly clicks on a login link (rather than being redirected after
                  trying to access a protected resource). Most of the time, this will be the same value as 'login.url'.
                    - same properties as login.url above
                -->
                <param-name>link.login.url</param-name>
                <param-value>/login.jsp?os_destination=${originalurl}</param-value>
                <!--<param-value>/secure/Dashboard.jspa?os_destination=${originalurl}</param-value>-->
                <!--<param-value>http://sso.mycompany.com/login?redirectTo=${originalurl}</param-value>-->
            </init-param>
            <init-param>
                <!-- URL for logging out.
                     - If relative, Seraph just redirects to this URL, which is responsible for calling Authenticator.logout().
                     - If absolute (eg. SSO applications), Seraph calls Authenticator.logout() and redirects to the URL
                     -->
                <param-name>logout.url</param-name>
                <param-value>/secure/Logout!default.jspa</param-value>
                <!--<param-value>http://sso.mycompany.com/logout</param-value>-->
            </init-param>

Example Steps to Change the Login URL (Explicitly Click on Login Link on Top Right of Page)

  1. Shutdown your JIRA application
  2. Open seraph-config.xml and find the following

                <param-name>link.login.url</param-name>
                <param-value>/login.jsp?os_destination=${originalurl}</param-value>
                <!--<param-value>/secure/Dashboard.jspa?os_destination=${originalurl}</param-value>-->
                <!--<param-value>http://sso.mycompany.com/login?redirectTo=${originalurl}</param-value>-->
  3. Edit it to your intended URL similar to the following

                <param-name>link.login.url</param-name>
                <!--<param-value>/login.jsp?os_destination=${originalurl}</param-value>-->
                <!--<param-value>/secure/Dashboard.jspa?os_destination=${originalurl}</param-value>-->
                <param-value>YOUR OWN URL TO REDIRECT TO</param-value>
  4. Save and Startup your JIRA application


Both absolute URLs and relative URLs should work. In some rare cases, if absolute URLs don't work, please try relative URLs for the login and logout URLs. 

Last modified on Sep 22, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.