How do I redirect HTTP requests to HTTPS without proxy

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

NOTES

1. The solution provided in this Knowledge Base article is not supported by Atlassian because it's a customization of the product.

2. Make sure that the instance is reachable over HTTPS without any issues before proceeding.

3. In this solution, the server name is localhost, the HTTP port is 8060, and the HTTPS port is 6443

4. This was tested in Fisheye 3.7.0 and in Fisheye 4.0.3. It is not guaranteed to work in other versions.

5. Needless to say, but just in case, give this a try in a test environment before rolling out to production.

Solution

1. Edit <FISHEYE_INST>/config.xml:

1 2 3 4 5 6 7 8 9 10 11 12 13 <web-server> <http bind=":8060"/> <ssl truststore="/path/to/keystore.kst" keystore="/path/to/keystore.kst" keystore-password="OBF:19q518ce18cg1abo1abe18ce18cg19q9" bind=":6443" truststore-password="OBF:19q518ce18cg1abo1abe18ce18cg19q9"> <proxy-info/> <excludeProtocols> <protocol>SSLv3</protocol> </excludeProtocols> </ssl> </web-server>

2. Edit <FISHEYE_HOME>/content/WEB-INF/web.xml:

Find the XML element below:

1 2 3 4 5 6 <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/s/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>

Edit url-pattern to just /*:

1 2 3 4 5 6 <filter-mapping> <filter-name>UrlRewriteFilter</filter-name> <url-pattern>/*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping>

3. Edit <FISHEYE_HOME>/content/WEB-INF/urlrewrite.xml:

Add the following rule:

1 2 3 4 5 6 <rule> <condition type="scheme" operator="notequal">https</condition> <condition name="host" operator="equal">localhost:8060</condition> <from>^/(.*)</from> <to type="permanent-redirect" last="true">https://localhost:6443/$1</to> </rule>

4. Restart the instance

After restarting the instance, whenever you try to access http://localhost:8060 you will be redirected to https://localhost:6443.

5. Document these changes

Whenever upgrading the instance, the changes in web.xml and in urlrewrite.xmlare not preserved. After extracting the Zip package of the new version, make sure to revisit this page and re-do the changes.

Also, do not copyweb.xml and urlrewrite.xml from the old instance over the ones in the new instance because there may be other changes in these files in the new version.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.