Apache reverse proxy converting json to html
<p>I will be amazed if anyone can answer this as I have found a few questions with no conclusive answers for the same but its worth a try.</p>

<p>I have an IBM IHS server fronting a websphere commerce 6 environment. In front of this on a separate server I have an Apache instance which is reverse proxying the requests to the Websphere box.</p>

<p>The reason for this is to manage certs etc..</p>

<p>Anyway the problem is that response from IHS in JSON are being converted by Apache to HTML. Subsequently the code cannot parse the data.</p>

<p>The 443 virtual host proxy is as per the below:</p>

<pre><code>ProxyHTMLStripComments off
ProxyHTMLFixups reset
ProxyHTMLEnable on
ProxyRequests off
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyHTMLDoctype XHTML
SSLEngine on
SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
&lt;FilesMatch "\.(cgi|shtml|phtml|php)$"&gt;
    SSLOptions +StdEnvVars
&lt;/FilesMatch&gt;
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
ProxyRequests off
ProxyPreserveHost On
&lt;proxy *&gt;
    Order deny,allow
    Allow from all
&lt;/proxy&gt;
SSLProxyEngine on
SSLProxyVerify none 
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off

ProxyPass / https://xx.xx.xx.xx/ retry=1 acquire=3000 timeout=600 Keepalive=On
ProxyPassReverse / https://xx.xx.xx.xx/
ProxyPassReverseCookiePath / https://xx.xx.xx.xx/
</code></pre>

<p>This works absolutely fine however for responses from the websphere server coming back as JSON they are being surrounded by HTML tags - html, body and p. I need to stop this - any ideas!? Will be forever in your debt!</p>