Forum Moderators: phranque

Message Too Old, No Replies

Reverse Proxy XML Response Rewrite

XML Result Rewrite

         

daveram

5:58 pm on Aug 18, 2011 (gmt 0)

10+ Year Member



Hello,
I have created a reverse proxy to proxy information to a 3rd party vendors software. Everything works and gets rewritten to the correct name, except an xml response. I need the server name in this response to get rewritten to the reverse proxy name. I have tried using mod_proxy_xml with no success. Below is posted the xml response, along with my apache2.conf file. The result in the XML should be, app01.thenetworkguru.org. Any suggestions would be greatly appreciated as this is my last obstacle. Thanks in advance.

Result XML Response
-------------------------------------------------------------------
<response result="success"><properties count="1"><property name="LastServer">HQNS01.thenetworkguru.local</property></properties></response>


apache2.conf
-------------------------------------------------------------------
DocumentRoot "/var/www"
ServerAdmin admin@thenetworkguru.org
ServerName app01.thenetworkguru.org
Listen 80
ThreadsPerChild 64
LockFile ${APACHE_LOCK_DIR}/accept.lock

PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
DefaultType text/plain

# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

ProxyRequests Off
ProxyPreserveHost On

ProxyPass / [hqns01.thenetworkguru.local...]
ProxyPassReverse / [app01.thenetworkguru.org...]

ProxyHTMLInterp On
ProxyHTMLURLMap [hqns01.thenetworkguru.local...] [app01.thenetworkguru.org...]

ProxyXMLURLMAP HQNS01.thenetworkguru.local app01.thenetworkguru.org