cannot get mod_substitute to substitute in response from remote server in reverse proxy setup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Trying to get mod_substitute to work for me in a 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
Discussion</a></li>
and...
      <h1>Public Discussion</h1>

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...

Chris

* * *

Here's the virtual host-related part of my config:

#
# stuff for testing

LoadModule substitute_module modules/mod_substitute.so

NameVirtualHost *:80

<VirtualHost *:80>
  LogLevel debug

</VirtualHost>

<VirtualHost *:80>
  ServerName help-proxy.asperasoft.com
  LogLevel debug

  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/"

</VirtualHost>

---------------------------------------------------------------------
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux