logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Reverse Proxy erases <meta http-equiv="Content-type&
Author
juancruz



Joined: 08 Jun 2015
Posts: 1

PostPosted: Tue 09 Jun '15 11:26    Post subject: Reverse Proxy erases <meta http-equiv="Content-type& Reply with quote

Hello to everyone,

this is my first post here.

I've already searched the forum for a related issue, but none of the results seems to solve my issue.

The setup is:

There is a MS Sharepoint 2013 deployed on IIS 7 in an internal customer network. This seems to behave correctly from within the internal network.

To make this service public, I have an apache 2.2 server running on Red Hat EL 6.0 on a DMZ. The apache has a vhost configured as Reverse proxy to allow the conections from outside.

Due to some links problems i found, I had to compile and integrate mod_proxy_html module to parse those Links.

The problem is that I see strange characters when accessing from outside (through the apache). And it is due to the Apache erasing an html meta tag:

From inside the MZ, the html code starts:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" lang="es-ES">

<head><meta http-equiv="X-UA-Compatible" content="IE=10" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta http-equiv="Content-type" content="text/html; charset=utf-8" /><meta http-equiv="Expires" content="0" /><meta name="msapplication-TileImage" content="/_layouts/15/images/SharePointMetroAppTile.png" /><meta name="msapplication-TileColor" content="#0072C6" /><title>

However, when accessed from outside, the html code starts:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" lang="es-ES">

<head><meta http-equiv="X-UA-Compatible" content="IE=10" /><meta name="GENERATOR" content="Microsoft SharePoint" /><meta http-equiv="Expires" content="0" /><meta name="msapplication-TileImage" content="/_layouts/15/images/SharePointMetroAppTile.png" /><meta name="msapplication-TileColor" content="#0072C6" /><title>

I have already tried adding to my httpd.conf:

AddDefaultCharset utf-8

ProxyHTMLCharsetOut utf-8

ProxyHTMLMeta On

The virtualhost is configured as follows (130.177.97.99 is the IP belonging to the backend):

Code:
<VirtualHost bpocenter-hp:5445>
        ServerName www.bpocenter-hp.com
        SSLProtocol -all +TLSv1
        SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
        SSLEngine on
        SSLProxyEngine on
        SSLCertificateChainFile /etc/httpd/cert_bpo-hp/intermediate.crt
        SSLCertificateKeyFile /etc/httpd/cert_bpo-hp/server.key
        SSLCertificateFile /etc/httpd/cert_bpo-hp/server.crt

        ProxyHTMLEnable On

        SetOutputFilter proxy-html

        ProxyHTMLLogVerbose On
        ProxyHTMLExtended on

        ProxyHTMLMeta On

        TransferLog "|/usr/serveis/app/apache/bin/rotatelogs /serveis/logs/bpocenter-hp/access_log 86400"
        ErrorLog "|/usr/serveis/app/apache/bin/rotatelogs /serveis/logs/bpocenter-hp/error_log 86400"

        ProxyRequests Off

#        ProxyPass / http://130.177.97.99:8065/ retry=1 acquire=3000 timeout=900 Keepalive=On
        ProxyPass / http://130.177.97.99:8065/ ttl=900 timeout=900 Keepalive=On
        ProxyPassReverse / http://130.177.97.99:8065/
        RequestHeader      unset  Accept-Encoding

        ProxyHTMLLinks  a               href
        ProxyHTMLLinks  area            href
        ProxyHTMLLinks  link            href
        ProxyHTMLLinks  img             src longdesc usemap
        ProxyHTMLLinks  object          classid codebase data usemap
        ProxyHTMLLinks  q               cite
        ProxyHTMLLinks  blockquote      cite
        ProxyHTMLLinks  ins             cite
        ProxyHTMLLinks  del             cite
        ProxyHTMLLinks  form            action
        ProxyHTMLLinks  input           src usemap
        ProxyHTMLLinks  head            profile
        ProxyHTMLLinks  base            href
        ProxyHTMLLinks  script          src for
        ProxyHTMLLinks  iframe          src

        ProxyHTMLEvents onclick ondblclick onmousedown onmouseup \
                onmouseover onmousemove onmouseout onkeypress \
                onkeydown onkeyup onfocus onblur onload \
                onunload onsubmit onreset onselect onchange

        SetOutputFilter proxy-html
        ProxyHTMLURLMap http://130.177.97.99:8065 https://www.bpocenter-hp.com:5445

</VirtualHost>


Any help would be appreciated.

Thanks.

Juan
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Wed 17 Jun '15 17:27    Post subject: Reply with quote

I think you can maybe use ProxyHTMLMeta Directive [1]

I'm not sure since mod proxy html is not offical part of apache 2.2



[1] http://httpd.apache.org/docs/current/mod/mod_proxy_html.html#proxyhtmlmeta
Back to top


Reply to topic   Topic: Reverse Proxy erases <meta http-equiv="Content-type& View previous topic :: View next topic
Post new topic   Forum Index -> Apache