Solved

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

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
500 Internal Server Error When I Run Code Igniter 4 71
Increase size of permitted URI 4 54
NGINX/Apache redirect on 403 and 404 5 133
.htaccess file settings 4 63
Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 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