Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-25-2012, 01:43 PM   #1
Registered: Jun 2011
Posts: 96

Rep: Reputation: Disabled
Redirecting Apache website to Tomcat

I'm running Apache2.2.3 and Tomcat 7 on my RHEL5 Linux box. Apache2.2.3 is running on the default port 80, Tomcat is running on port 8080.

What I'd like to do is to redirect an incoming request from apache to Tomcat.

For example, say I have, and I also a web application with jsps. The web application is currently up and running on Tomcat so I can access the web application as path. would serve the same content as www. path.
Old 05-25-2012, 01:58 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981Reputation: 1981
ProxyPass /
ProxyReversePass /

see the mod_proxy documentation for further uses of apache as a reverse proxy.

Alternatively look at mod_jk or mod_proxy_ajp
Old 05-30-2012, 09:41 AM   #3
Registered: Jun 2011
Posts: 96

Original Poster
Rep: Reputation: Disabled
thank u for your reply and sorry that i couldn't get back to you quickly,i managed to redirect Apache to tomcat,but the query goes to the ROOT directory and default tomcat page opens,but my web application is in webapps,and i tried the following in httpd.conf file:
Proxy Pass /webapp name ajp://localhost:8009/webapp name
Proxy PassReverse /webapp name ajp://localhost:8009/webapp name
Please provide me with the correct format of directing to my webapp.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod Rewrite rule error redirecting to tomcat page jsaravana87 Linux - Server 1 11-16-2011 12:55 AM
creating website under apache tomcat mlnm Linux - Newbie 2 11-08-2011 01:53 PM
Redirecting Apache/Tomcat Logs to rsyslog without writing to disk.... elorson Linux - Software 1 05-28-2011 11:56 PM
Redirecting website to another server fedora_user Linux - Newbie 13 05-07-2009 04:55 AM
hosting asp.NET website on linux based server using Tomcat Apache harrybazeegar Linux - Server 3 06-02-2007 06:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration