Redirecting from port 80 to different ports based on URL

强颜欢笑 提交于 2019-11-30 01:27:58

There are 2 ways of solving this.

Redirect Method

  1. You seem pretty savvy setting up servers. You will need a web Server running on port 80. (Apache: Windows/*nix; IIS: Windows)
  2. Set up a virtual site / folder if you just want example.com/jira and example.com/confluence. You could also do jira.example.com and confluence.example.com if you had your DNS records pointing to the host.
  3. Use a 302 Redirect (temporary/found) to redirect a browser hitting this URL/Virtual Host to the new URL. This method changes the URL in the browser so the browser actually shows the 8080 and 8090 ports.

Proxy Method

The other way, if you wanted transparent URLs would be to set up reverse proxies on the 2 URLs. This way the proxy server on port 80 responds to the client as if the content is originating from port 80. The web server fetches the pages in the background and serves them up. You have the added benefit of caching content using a reverse proxy.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!