How to redirect a Users sesion to port 80 (the base URL)

Jira is setup with a Server Base URL of: http://jira.internaldomain.com

iptables is used to redirect Jira on port 8888 to 80 with:

Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 8888

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Confluence is setup with a Server Base URL of: http://confluence.internaldomain.com

iptables is used to redirect Confluence on port 8090 to 80 with:

Chain PREROUTING (policy ACCEPT)
target prot opt source destination
REDIRECT tcp -- anywhere anywhere tcp dpt:http redir ports 8090

Chain POSTROUTING (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

So what's the problem? Some users insist on coming into Jira and Confluence on ports 8888 and 8090. The use of the port number will persist in the URL as the user moves around in Jira and Confluence. Ocassioanly they stumble accross a feature where problems arise when the URL in the session and the Base URL do not match. Is there a way to force the user to port 80 on the inital access with actual port the service is running on? (Also, telling the user to not do this, or update their bookmark, does not work.)

1 answer

1 accepted

You can't. Users are stuborn and they are going to do what they are going to do. They best you can hope for is that someone reads that email you send out or the message you put on the welcome page warning them to use the Base URL.

Stick Apache in front of it as a proxy (you can then drop iptables) and create a vhost to catch 8888 and 8090 access and automatically shove them to port 80 ?

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,909 views 27 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you