Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2006-10-31
4
Medium Priority
?
399 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
ramazanyich earned 750 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

609 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