0

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?

Community
  • 1
  • 1
sbr
  • 4,735
  • 5
  • 43
  • 49
  • 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? – hmakholm left over Monica Aug 19 '11 at 22:43
  • 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. – sbr Aug 19 '11 at 22:47

2 Answers2

6

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...

Don Roby
  • 40,677
  • 6
  • 91
  • 113
0

Since you mentioned about "users", I am guessing you are implying "hostname", when you mention "localhost". If you have a Load Balancer and a user friendly DNS name that you would give to the users, you can configure your Load Balancer software to route all requests to "hostnameyougavetotheUsers" to "yourinternalhostname:8080".

Arun
  • 2,493
  • 15
  • 12