Solved

redirect and mask of dynamic webpage (apache -> tomcat)

Posted on 2006-10-31
4
393 Views
Last Modified: 2008-02-01
Hi,

I have an apache-server running with a virtual host. (i.e. www.myserver.com)

I need to use some pages from a tomcat server on a different machine. I would like to mask these pages so that a call to www.myserver.com/jsp/do_stuff.jsp will redirect to my tomcat server, run the script (http://12.34.56.78/jsp/do_stuff.jsp) and then return the resulting page as if it came from www.myserver.com.

I've tried a few things with Rewrite and proxy in the httpd.conf, but only been able to redirect the call, not mask it.

Please give me some suggestions, and I will try them.

--
tekniskma
0
Comment
Question by:tekniskma
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
ramazanyich earned 250 total points
ID: 17853886
You can use mod_jk to communicate from Apache web server with Tomcat server.
There is a nice HOWTO on apache.org site how to install and configure communication between apache and tomcat:
http://tomcat.apache.org/connectors-doc/howto/apache.html
0
 

Author Comment

by:tekniskma
ID: 17858834
I tried this, but the tomcat server used so much time responding that all my threads in apache (set by MaxClients in httpd.conf) were stuck pointing to the tomcat-server and no one could get in to the apache-server.

There might be mod_jk settings I don't know of, but this is why I wanted to redirect the call. So that apache let go of the threads.
0
 
LVL 19

Expert Comment

by:ramazanyich
ID: 17859008
But it will not solve a problem. As request which comes to Apache will wait until your tomcat server makes a response. So apache thread still will be active.
So better check your application in Tomcat to avoid long waiting times.
0
 

Author Comment

by:tekniskma
ID: 17866162
This works for redirecting, but the answer is from http://12.34.56.78:8080 unfortunately.

        RewriteEngine On
        RewriteRule /jsp/(.*) http://12.34.56.78:8080/jsp/$1 [R,NE]

I guess I can't return the result through the apache without keeping the thread open from the apache.

Thanks anyway
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Maintain Parameters on URL throughout Site (PHP) 6 32
Trying to connect the LDAP over SSL 38 250
LAMP problem identifier tool ? 9 110
phpPgAdmin problem 14 86
If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If you've heard about htaccess and it sounds like it does what you want, but you're not sure how it works... well, you're in the right place. Read on. Some Basics #1. It's a file and its filename is .htaccess (yes, with a dot in the front). #…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now