Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Redirect URL with port in Tomcat

John Rehill September 26, 2016

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
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2016

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)

0 votes
Rich Duncan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2016

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
TAGS
AUG Leaders

Atlassian Community Events