LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

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

Rep: Reputation: Disabled
Redirecting Apache website to Tomcat


Hi,
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 www.mysite.com, 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 www.mysite.com:8080/context path.

domain.mysite.com would serve the same content as www. mysite.com:8080/context path.
 
Old 05-25-2012, 01:58 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
ProxyPass / http://127.0.0.1:8080/context/
ProxyReversePass / http://127.0.0.1:8080/context/

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


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mod Rewrite rule error redirecting to tomcat page arun5002 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


All times are GMT -5. The time now is 01:41 PM.

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