Solved

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

Posted on 2006-10-31
4
396 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 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

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
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). #…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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