How to prevent a user from browsing the Jira/Confluences sites when URL has port?

Lisa Bruney September 19, 2019

Would like that the user is only able to reach the site via jira.domain.com, not jira.domain.com:port. If they go to jira.domain.com:port, then prefer a redirect to jira.mydomain.com or something like that.

Additional details:

My configuration is with reverse proxy via Apache htaccess. 

So in the domain directory, I have a htaccess file with:

RewriteRule ^(.*)$ http://domain.com:port/$1 [L,P]

1 answer

1 accepted

0 votes
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2019

Hi Lisa,

I understand you've got Apache running in front of your Atlassian applications. That's great - reverse proxies are helpful in fine-tuning how people access your applications.

Jira and Confluence need to be able to listen to connections locally so they can process requests from Apache. They'll still need to serve Apache on the ports they currently have configured. What you're going to want to do is configure the network/firewall in your environment to not serve those ports outside localhost.

I wouldn't sweat too much about rewrite rules in your situation unless there's a long history of people bookmarking URLs with the port attached. Configuring a firewall such that Apache listens to external connections on a particular port that's still in use internally on localhost by Jira/Confluence would be... difficult. Instead, simply providing the new link or retraining users to not use the port would be simpler.

How you go about this is highly dependent on the operating system you're running on and what the overall server environment looks like. If you have a networking team or people managing VM infrastructure (if this server is a VM), they may be able to assist in simply closing non-local incoming access on the ports Jira and Confluence are using. Your Apache instance would still listen for connections on port 80 (and port 443 if you enable HTTPS) and proxy them to the Atlassian applications.

Cheers,
Daniel

Suggest an answer

Log in or Sign up to answer