apache mod_proxy or mod_rewrite for hide a root of a webserver behind a path

Posted by Giovanni Nervi on Server Fault See other posts from Server Fault or by Giovanni Nervi
Published on 2013-11-03T08:03:12Z Indexed on 2013/11/03 9:58 UTC
Read the original article Hit count: 268

Filed under:
|
|

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

© Server Fault or respective owner

Related posts about apache2

Related posts about mod-rewrite