httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rocco Scappatura" <Rocco.Scappat...@sttspa.it>
Subject [users@httpd] Configure mod_proxy_html
Date Fri, 30 Nov 2007 13:56:18 GMT
Hello,
 
I have two Tomcat webapps, say  'app1' and 'app2', reacheable locally at
the following URLs:
 
http://localhost:8081/app1 (app1)
http://localhost:8081/app2 (app2)
 
I would like to publish on Internet app1 and a 'subset' of app2:

http://www.mydomain --> http://localhost:8081/app1 
http://www.mydomain/sub --> http://localhost:8081/app2/sub

So I'm try to configure 'mod_proxy_html' as reported at
http://www.apachetutor.org/admin/reverseproxies:

LoadModule proxy_module      modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule headers_module    modules/mod_headers.so
LoadFile   /usr/lib/libxml2.so
LoadModule proxy_html_module modules/mod_proxy_html.so: 

ProxyRequests off
ProxyPass / http://localhost:8081/app1 
ProxyPass /sub/ http://localhost:8081/app2/sub
ProxyHTMLURLMap http://localhost:8081/app1 /
ProxyHTMLURLMap http://localhost:8081/app2 /app2

<Location /app1/>
        ProxyPassReverse /
        SetOutputFilter  proxy-html
        ProxyHTMLURLMap  /      /app1/
        ProxyHTMLURLMap  /app1  /app1
        RequestHeader    unset  Accept-Encoding
</Location>

<Location /app2/sub/>
        ProxyPassReverse /
        SetOutputFilter proxy-html
        ProxyHTMLURLMap /       /app2/sub/
        ProxyHTMLURLMap /app2/sub   /app2/sub
        RequestHeader   unset   Accept-Encoding
</Location>

But itdoesn't work.

I get always the home page of app1 (the same is for app2) with link
inside (images, css, link and so on) wrong. ;ore precisely each link is
prefixed by:

http://www.mydomain/app1 
http://www.mydomain/app2/sub 

And so I don't get a correct navigation.

Where is the mistake?

rocsca

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message