Apache to Tomcat proxy what to do when i redirected to file not in proxyPass

Posted on

Apache to Tomcat proxy what to do when i redirected to file not in proxyPass – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, proxy, tomcat, , .

I have configured a proxy from apache2 to tomcat6
All working, plain and simple, but I have a problem when from my tomcat app I need to redirect to a JSP that is outside of the directory I configured with the ProxyPass directive.

This is what i have :

ProxyRequests Off
ProxyPreserveHost On 
ProxyPass         /  http://127.22.22.1:8080/jsp/app/crm/
ProxyPassReverse  /  http://127.22.22.1:8080/jsp/app/crm/

I need to redirect to a file that is http://127.22.22.1:8080/ut/disable.jsp
and when it redirects to it I’m getting :

/ut/disable.jsp?error=The%20user%20can't%20access%20the%20page HTTP/1.1" 404 1084

How can I enable other files from other directories to be proxied? just from within the jsp/app/crm/ directory?

Solution :

If you want to provide clients with access to something hosted at /ut/disable.jsp, you’re going to need to add the necessary ProxyPass directive. For only that particular file:

ProxyPass /ut/disable.jsp http://127.22.22.1:8080/ut/disable.jsp

Or for the entire /ut/ context:

ProxyPass /ut/ http://127.22.22.1:8080/ut/

Or you will have to modify your Tomcat application so that all URLs fall within the /jsp/app/crm/ context.

Leave a Reply

Your email address will not be published.