Redirect URL with port in Tomcat

Hi,

Many years ago we setup JIRA and Stash (yes, now Bitbucket) on a single server. JIRA was first so that used port 80. When Stash was installed, another IP address was assigned to the server so that this would use port 80 over another IP, without needing a port specification in the URL. As a sidenote Bamboo is also on this server.

The server is now being transitioned to another network structure and I wondering if we can drop the requirement for the additional IP address however I don't want the users to have to start using an address of URL:port. Is there anyway that I can have, within Tomcat, traffic intended for stash-URL to go to stash-URL:port, so that the users can still use the basic URL for both JIRA and Stash? I'm using a Windows 2008 R2 server.

2 answers

1 vote

You can't run two things on the same port on the same server.  You're going to need to do something with proxies for this.  The really easy case is running a couple of services on different ports on the same server and using Apache to say "url X goes to port Y, and url Z goes to port A".  Atlassian applications not only support that sort of thing, but pretty much assume it's going to happen.

So, you need to decide on a scheme and implement it with a webserver - Apache is the best documented and tested, but it works perfectly with nginx (slightly less docs, but easier to configure), lighttpd (very little docs, but also easy to set up) and even IIS (more docs, %$"%$ horrible server with even worse config, but despite how bad it is, does also actually work)

Hi John - You could use Apache httpd as a proxy and use the incoming host name to differentiate the traffic.  Check the Atlassian documentation for the details...

 

-Rich

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

174 views 20 8
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