is setting tomcat application url to http:// hostname/application/ possible?

25,803

You need to look at the Tomcat-Apache HOWTO.

It is entirely possible and in fact quite common for apache and tomcat to be used in combination by the tactics described in this page.

And this question really probably belongs on serverfault...

Share:
25,803
sbr
Author by

sbr

Areas of Interest: Functional JavaScript, jQuery, HTML5, JS design patterns.

Updated on July 07, 2022

Comments

  • sbr
    sbr almost 2 years

    I have a setup, with tomcat running on port 8080 and apache webserver running on port 80.

    So if I access http://localhost:8080/myapplication/ , it works.

    But I need to be able to make it like : http://localhost/application/, but since my http web server runs on port 80, it seems that i need some re-direction logic or changes at the tomcat to achieve this.

    Can anyone please suggest i way out. Thanks.

    UPDATE: Just found that there is already a solution provided here: How do I redirect from Apache to Tomcat?

    • hmakholm left over Monica
      hmakholm left over Monica almost 13 years
      Why do you "need" to make it run on the same port the apache server is already using? Which kind of workarounds would be acceptable for you? For example, is it OK to configure the apache server to redirect the browser to port 8080, or do you need it to proxy the request through to the other server?
    • sbr
      sbr almost 13 years
      any redirect on apache would be ok. the only requirement is :lets say the app is called hostname/application, I dont want the users to go to a url which looks like : hostname:8080/application.