Redirect from port 80 to different ports based on URL

I have two applications (Atlassian JIRA and Confluence) listening on ports 8080 and 8090, accessible through example.com:8080/jira and example.com:8090/confluence. I would like to set up a redirect to port 80 so that I can access the services through example.com/jira and example.com/confluence.

Is there an easy way to achieve this?

+7
redirect url-redirection port routing
source share
1 answer

There are two ways to solve this.

Redirection method

  • It seems to you that you are well versed in server settings. You will need a web server running on port 80. (Apache: Windows / * nix; IIS: Windows)
  • Set up a virtual site / folder if you just want example.com/jira and example.com/confluence. You can also do jira.example.com and confluence.example.com if you have DNS records pointing to the host.
  • Use 302 redirection (temporary / found) to redirect the browser by clicking this URL / virtual host to the new URL. This method changes the URL in the browser, so the browser actually shows ports 8080 and 8090.

Proxy method

Another way is if you want transparent URLs to be linked to reverse proxies on two URLs. Thus, the proxy server on port 80 responds to the client as if the content was coming from port 80. The web server retrieves the pages in the background and serves them. You have the added benefit of caching content using a reverse proxy.

+6
source share

All Articles