Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have an apache virtual host now Im trying to get to go to load the pages from using mod_poxy i have it with a base

ProxyPass /mypath
ProxyPassReverse /mypath

however the link on are all <a href='/xxx/xx'>example link</a>

so when they come back to the the are how can i get them to be


share|improve this question
up vote 2 down vote accepted

This can be achieved by using mod_proxy_html which is capable of rewriting links. Generally this would not be a problem if your webpage would be using relative paths.

With the module installed you can use a configuration similar to this one

LoadModule proxy_module      modules/
LoadModule proxy_http_module modules/
LoadModule headers_module    modules/
LoadFile   /usr/lib/
LoadModule proxy_html_module modules/
LoadModule xml2enc_module modules/

# Disable Proxy Requests since this is not a forward proxy
ProxyRequests off

ProxyPass /mypath/
ProxyHTMLURLMap /mypath

<Location /mypath/>
        ProxyPassReverse /
        ProxyHTMLEnable On
        ProxyHTMLURLMap  /      /mypath/

        # You cannot rewrite gzip compressed streams
        RequestHeader    unset  Accept-Encoding

You can read up more about mod_proxy_html here and here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.