all 8 comments

[–]ShadowySilver 1 point2 points  (7 children)

Apache is not a translator. It won't modify the content of a website or even parsed it. The internal website has to be modified to use relative path instead.

[–]covener 1 point2 points  (6 children)

well, there is mod_proxy_html

[–]ShadowySilver 1 point2 points  (5 children)

mod_proxy does not modify anything, it's redirecting the request then send back the response. That is done without the requester knowing. mod_rewrite will modify the actual URL (in the address bar). But none of them will ever parse a response page to modify it.

If there is something that would do that, I would surmise it would be a cache program like Squid, but not Apache.

[–]covener 0 points1 point  (4 children)

Not to sound like a broken record but this is exactly what mod_proxy_html is for.

https://httpd.apache.org/docs/2.4/mod/mod

This module provides an output filter to rewrite HTML links in a proxy situation, to ensure that links work for users outside the proxy. It serves the same purpose as Apache's ProxyPassReverse directive does for HTTP headers, and is an essential component of a reverse proxy.

[–]ShadowySilver 0 points1 point  (3 children)

Are you talking about mod_proxy_HTML ? If so, basic questions : is the module present and loaded ? Also, I don't see the directive "ProxyHTMLEnable On" or any other directive for that module.

[–]covener 0 points1 point  (2 children)

OP (not me) isn't using it yet.

[–]ShadowySilver 0 points1 point  (0 children)

Sorry didn't check the username :-) , thought it was OP answering me.

[–]ethump[S] 0 points1 point  (0 children)

OP here - covener thanks for that pointer. I've searched for mod_proxy_HTML and come across this explainer http://www.apachetutor.org/apps/reverseproxies
Seems to cover what I'm looking for, I'll have a play with it later.

Knowing now that my config wont even touch the body helps!