cmarkle at asperasoft
Oct 28, 2010, 2:13 PM
Post #1 of 3
Trying to get mod_substitute to work for me in a reverse proxy setup
cannot get mod_substitute to substitute in response from remote server in reverse proxy setup
and having troubles, specifically the substitution in not occurring in
responses from the remote server. Basically my browser clients are
contacting my Apache setup at help-proxy.asperasoft.com and are being
reverse proxied to help.asperasoft.com. I want to perform
substitutions in the response that comes back from that remote HTTP
server (help.asperasoft.com) before the response is passed back to the
browser. (Note that help-proxy.asperasoft.com is not accessible from
the Internet, it's internal to my company...)
I tried using mod_substitute and it seems to not be doing
substitutions in the contents being returned from the remote server.
It is doing substitutions in content begin returned from Apache
itself. I see this by having made a substitution to the Apache Test
Page and if I go to http://help-proxy.asperasoft.com/ I see the
substitution is made. But if I go to
http://help-proxy.asperasoft.com/discussions, the content of which is
reverse proxied from help.asperasoft.com, the substition is not made
even though "Public Discussion" is in the response document:
<li class="public_issues"><a href="/discussions">Public
Any thoughts about what might be happening here or how I can go about
debugging this? If nod_substitute can't work in this way, any
suggestions about what might work?
Thanks in advance...
* * *
Here's the virtual host-related part of my config:
# stuff for testing
LoadModule substitute_module modules/mod_substitute.so
ProxyPass /discussions http://help.asperasoft.com/discussions
ProxyPass /faqs http://help.asperasoft.com/faqs
ProxyPass /images http://help.asperasoft.com/images
ProxyPass /setup http://help.asperasoft.com/setup
ProxyPass /marketing http://help.asperasoft.com/marketing
ProxyPass /stylesheets http://help.asperasoft.com/stylesheets
ProxyPass /login http://help.asperasoft.com/login
AddOutputFilterByType SUBSTITUTE text/html
Substitute "s/Public Discussion/Public Discussion Boo Yah/"
Substitute "s/Apache Test Page/Apache Test Page Boo Yah/"
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd