Configure mod_proxy_html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux