Redirect Crowd Server Setup Page to Crowd WebApp Login Page
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
If you need to redirect users accidentally going to the Crowd Server Setup page (accessed through <http://crowd-hostname:port>)
instead of Crowd WebApp Login page (accessed through <http://crowd-hostname:port/crowd>
), below are the steps to do it.
Solution
Stop Crowd
Copy
urlrewritefilter-4.0.3.jar
FROM<crowd-install>/crowd-webapp/WEB-INF/lib/
TO<crowd-install>/apache-tomcat/lib/
Copy
urlrewrite.xml
FROM<crowd-install>/crowd-webapp/WEB-INF/
TO<crowd-install>/apache-tomcat/webapps/ROOT/WEB-INF
Update the file to contain only the following XML:
urlrewrite.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite
PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN"
"http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">
<urlrewrite>
<rule enabled="true">
<from>/</from>
<to type="permanent-redirect">/crowd/</to>
</rule>
</urlrewrite>
Modify
web.xml
found in<crowd-install>/apache-tomcat/webapps/ROOT/WEB-INF/
and replace the contents with the following:
web.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app>
<display-name>Crowd</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<filter>
<filter-name>url-rewrite</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>url-rewrite</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
Start Crowd
Crowd Server Setup Page will automatically redirect the request to /crowd
To avoid browser caching, either test this using Incognito Mode/Private Browsing or clear your browser cache.
Status
After restarting you can visit http://127.0.0.1:8080/rewrite-status (or whatever the address of your local webapp and context) to see output (note: this page is only viewable from localhost).
Was this helpful?