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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

701 views 0 4
Read article

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot