apache mod_proxy or mod_rewrite for hide a root of a webserver behind a path
- by Giovanni Nervi
I have 2 apache 2.2.21 one external and one internal, I need to map the internal apache behind a path in external apache, but I have some problems with absolute url.
I tried these configurations:
RewriteEngine on
RewriteRule ^/externalpath/(.*)$ http://internal-apache.test.com/$1 [L,P,QSA]
ProxyPassReverse /externalpath/ http://internal-apache.test.com/
or
<Location /externalpath/>
ProxyPass http://internal-apache.test.com/
ProxyPassReverse http://internal-apache.test.com/
</Location>
My internal apache use absolute path for search resources as images, css and html and I can't change it now.
Some suggestions?
Thank you