2

I need to proxy a web application from oldname.my.net to newname.my.net For that I use apache with the proxy module like this

    # PROXY TO INTERNAL SERVER
    ProxyPreserveHost On
    RequestHeader set Host "oldname.my.net"
    RequestHeader set Authorization "Basic asj2dhI2dBASE64asdjlk="

    ProxyPass / http://server.local/
    ProxyPassReverse / http://server.local/
    ProxyPassReverseCookieDomain oldname.my.net newname.my.net

    <Location />
       SetOutputFilter  proxy-html
       ProxyHTMLURLMap http://oldname.my.net/ /
       RequestHeader    unset  Accept-Encoding
    </Location>

The proxy works so far, I can login and browse, click on links, etc. But some of the content is loaded via AJAX requests and they don't seem to work. I have no experience in web development so I don't exactly know how they work or what they do but they seem to be loading content dynamically and I think that the ProxyHTMLURLMap option is messing with them.

Does anyone have experience with apache proxy and sites that use both hardcoded links (ProxyHTMLURLMap is a must for the site to work) and AJAX request?

mohrphium
  • 615
  • 2
  • 9
  • 16
  • You have any update on your answer? I am having the same problem. – djmj Nov 15 '14 at 14:04
  • Unfortunately not. Sorry. – mohrphium Nov 17 '14 at 09:44
  • I now use substitute module as replacement. Saw it on stack overflow or somewhere else. http://serverfault.com/questions/644594/apache-reverse-proxy-proxyhtmlurlmap-not-rewriting-ajax-responses – djmj Nov 17 '14 at 17:32

0 Answers0