Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

JIRA Redirect to FQDN

I am running JIRA server 7.13.0 and trying to get a redirect to work from the server shortname to the FQDN without a proxy if possible

Right now users can go to:

https://jira or https://jira.FQDN.com 

I want everyone on the FQDN so things work as they should with the base url.

I was reading about: https://confluence.atlassian.com/fishkb/how-do-i-redirect-http-requests-to-https-without-proxy-707724570.html

When playing in my lab environment I was not having much success using the urlrewrite. Has anyone had luck this way? Or are people using something like apache?

 

For confluence (running windows.. for now), I ended up using IIS and do not want to go that route. 

1 answer

1 accepted

1 vote
Answer accepted
Daniel Eads Atlassian Team Apr 09, 2019

Hey Mike,

I definitely get wanting to shy away from IIS. Apache and especially nginx aren't that bad though! They both run on Windows so you could go that route if you wanted before switching over to a Linux server.

After playing around with this a little in a test environment, I was able to get this working with Jira in Tomcat. All that was required was adding a rule to urlrewrite.xml which for Jira is located at:

<jira-install>/atlassian-jira/WEB-INF/urlrewrite.xml

Below the existing <rule></rule> section in the file, I added the following rule (make sure to update the FDQN to the proper value):

<rule>
<condition type="scheme" operator="equal">https</condition>
<condition name="host" operator="equal">jira</condition>
<from>^/(.*)</from>
<to type="permanent-redirect" last="true">https://jira.FQDN.com/$1</to>
</rule>

Don't forget to restart Jira after making changes in this file to have them go into effect. And also - make sure you do this on a test environment first!

 

As mentioned in the documentation you linked to, doing this kind of change in your install directory won't persist across Jira upgrades. It's generally better to do this behind a reverse proxy so that it persists upgrades and is easier to troubleshoot. Pretty easy for this change to get lost in the Jira install path, whereas it's pretty simple to see an nginx config. Some food for thought as you move forward.

Cheers,
Daniel

Thanks Daniel - This leads me on the right track. Looks like I am getting ERR_TOO_MANY_REDIRECTS now but it is redirecting. Maybe something in my iptable rules is causing it

Edit: I put it on the default port and removed all iptable rules but still getting the too many redirects. Will continue troubleshooting. Thanks

Thanks to your answers I figured out a way to redirect all names not matching the defined base URL.

<rule>
<condition type="scheme" operator="equal">https</condition>
<condition name="host" operator="notequal">jira.my-domain.local</condition>
<from>^/(.*)</from>
<to type="permanent-redirect" last="true">https://jira.my-domain.local/$1</to>
</rule>

This approach also avoids the ERR_TO_MANY_REDIRECTS.

In my server.xml short names coming via HTTP connector are redirected to HTTPS connector first. So this rule applies also to requests which used HTTP initially.

Like Daniel Eads likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you