LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-25-2011, 03:50 AM   #1
pudhiyavan
Member
 
Registered: Oct 2003
Location: Linux world
Distribution: redhat,mandy,centos,debian,ubuntu
Posts: 209

Rep: Reputation: 30
apache 2.2.3 tomcat 7 proxying


Hi
Tried using mod_proxy along with tomcat 7 multiple instances, but in vain,
scenario
having one public ip, one private ip in remote linux machine (CentOS 5)

apache 2.2.3
tomcat instance1 7.0
tomcat instance2 7.0

tried it with proxy at apache since the requirement is myhost.com/instance1 and myhost.com/instance2

tomcat instance1 is running at port 8009
tomcat instance2 is running at port 8010 in same machine.

can someone guide me pls
 
Old 03-25-2011, 05:11 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
Blog Entries: 1

Rep: Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072
Hi,

Have a look here to setup apache as a reverse proxy

Regards
 
Old 03-25-2011, 05:14 AM   #3
pudhiyavan
Member
 
Registered: Oct 2003
Location: Linux world
Distribution: redhat,mandy,centos,debian,ubuntu
Posts: 209

Original Poster
Rep: Reputation: 30
tried similar, infact followed

http://www.hiteshagrawal.com/apache/...uest-to-tomcat this link too
 
Old 03-25-2011, 05:51 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
Blog Entries: 1

Rep: Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072
Quote:
Originally Posted by pudhiyavan View Post
tried similar, infact followed

http://www.hiteshagrawal.com/apache/...uest-to-tomcat this link too
And what happened? Could you post your config and any apache error logs?
Note that the link you've followed uses proxy_ajp instead of mod_proxy, but it misses some stuff.
Basically a reverse proxy configuration should look like this (using mod_proxy):
Code:
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /instance1 http://myhost.com:8009/instance1
ProxyPassReverse /instance1  http://myhost.com:8009/instance1
In case of proxy_ajp you need to replace http with ajp in the url above. The rest is the same.
 
Old 03-25-2011, 06:51 PM   #5
pudhiyavan
Member
 
Registered: Oct 2003
Location: Linux world
Distribution: redhat,mandy,centos,debian,ubuntu
Posts: 209

Original Poster
Rep: Reputation: 30
yes instead of http, i used ajp, still it is not getting redirected.
 
Old 03-26-2011, 04:59 AM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,218
Blog Entries: 1

Rep: Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072Reputation: 2072
Hi,

If you want help on this, you should post logs and configuration snippets, as you're asked. We cannot make assumptions

Regards
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Session replication using apache+mod_jk+tomcat(5.5.28-veriosn of tomcat) sreejithp Linux - Server 1 12-24-2010 07:46 AM
Correct Apache RewriteCond to stop proxying ... curtisa Linux - Security 1 07-21-2009 11:38 AM
apache httpd config:how can i rewrite urls in javascript while reverse proxying amolgupta Linux - Software 0 07-20-2009 02:43 AM
apache-tomcat and jakarta-tomcat shifter Programming 1 07-28-2007 11:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration