Forum Moderators: phranque

Message Too Old, No Replies

Introduce myself and a question about context change

         

sitedispatch

5:48 pm on Jan 19, 2010 (gmt 0)

10+ Year Member



Hello everyone.
First of all I would like to introduce myself.
See if you can help me with the settings I need.
I have an application installed in tomcat root context of a server:
[interal_ip:81...]
This application I want to serve to Internet with an Apache server that is serving other applications, but I want to be published in a context different than root like:
[external_ip...]
I've tested ProxyPass and ProxyPassReverse, but I can not the application to work correctly and that all links are designed so that the application is in the context root.
I've done several tests with mod_rewrite, but I had no success.
Any suggestions?

Thanks and regards.

sitedispatch

1:35 pm on Jan 20, 2010 (gmt 0)

10+ Year Member



I have the problem partially solved with this settings:

ProxyHTMLLogVerbose On
LogLevel warn
ProxyHTMLExtended On
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass /portal/ [internal:8100...]
ProxyPassReverse /portal/ [internal:8100...]
RewriteEngine On
RewriteLogLevel 0
RewriteLog logs/rewrite_log
RewriteCond %{REQUEST_URI} !^/portal/
RewriteRule ^/(.*)$ [internal:8100...] [P]

The problem now is that the redirects and the images are referenced to urls without the “/portal/” folder, it works but is not valid for us.

jdMorgan

3:28 am on Jan 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What version of Apache are you on?

There are some additional mod_proxy settings available in Apache 2.x that you should look into regarding back-end redirects, etc.

Jim

sitedispatch

8:57 pm on Jan 21, 2010 (gmt 0)

10+ Year Member



I'm using apache 2.2. Is there some setting to resolve my issue?
As you can see I'm an absolute newbie in Apache.

jdMorgan

9:18 pm on Jan 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm no back-end-server-app guru, and these problems can be very tough to understand (which is really the hardest part) so I'm just suggesting that a review of the mod_proxy documentation for version 2.2 at apache.org would seem to be in order. There are some new directives such as PreserveProxyPath (or something like that) that may be helpful.

Jim