You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Cruz Villanueva, Juan" <ju...@hp.com> on 2015/06/16 08:58:45 UTC

[users@httpd] RE: Apache Reverse Proxy deletes from code

No one has seen this issue (or similar one) before?



Best regards.

Juan Cruz Villanueva

From: Cruz Villanueva, Juan
Sent: viernes, 12 de junio de 2015 16:43
To: users@httpd.apache.org
Subject: [users@httpd] Apache Reverse Proxy deletes <meta http-equiv=“Content-type” content=“text/html; charset=utf-8” /> from code

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.
My systems setup is as follows:
There is a MS Sharepoint 2013 served 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 virtual host 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.
[cid:image001.png@01D0995E.376D7440]The problem is that I see strange characters when accessing from outside (through the apache). And it seems to be due to Apache erasing an html meta tag.
[cid:image006.png@01D0A812.A55604A0][cid:image003.png@01D0995E.F44D3320]


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

Tag missing: meta http-equiv="Content-type" content="text/html; charset=utf-8".
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):
<VirtualHost bpocenter-hp:5445>
    ServerName www.bpocenter-hp.com<http://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/ 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

Any help would be appreciated.
Thanks.
Juan




Atte.

Juan Cruz Villanueva
ITO / WebVault

Juan.cruz-villanueva@hp.com<ma...@hp.com>
T +34 93 565 4518
Hewlett-Packard Company
Parc Activitats Econòmiques Can Sant Joan
Av Generalitat 163-167
08174  Sant Cugat del Vallès, Spain

[cid:image003.jpg@01CCBE4E.896EAC80]
This email contains information which is confidential and may be privileged. Unless you are the intended addressee (or authorised to receive for the addressee) you may not use, forward, copy or disclose to anyone this email or any information contained in this email. If you have received this email in error, please advise the sender by reply email immediately and delete this email.


RE: [users@httpd] RE: Apache Reverse Proxy deletes from code

Posted by ap...@thva.dk.
hello hello hello,


Ive seen exactly that behavior many times in 2.2.29. Once 
ProxyHTMLEnable is invoked in a vhost, output is heavily influenced, 
eventhough there are no rules to define modification of any html at 
all.. The rules i define works flawlessly, but the filter invocation 
swallows more than it should... i have been pulling my hair for this 
problem, with the result of light baldness...

I wasnt aware of the bug report - yet, i am not sure, whether it applies 
a fix at some point for the 2.2 branch - anyone to know this ?



br
congo

On 2015-06-16 17:25, Cruz Villanueva, Juan wrote:
> Hello Yann,
> 
> Thanks for your reply.
> 
> I'll review this link. It's really possible that it's related
> 
> I'll post my findings later.
> 
> Thanks.
> 
> Juan Cruz Villanueva
> 
> -----Original Message-----
> From: Yann Ylavic [mailto:ylavic.dev@gmail.com]
> Sent: martes, 16 de junio de 2015 9:09
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] RE: Apache Reverse Proxy deletes <meta
> http-equiv=“Content-type” content=“text/html; charset=utf-8” /> from
> code
> 
> On Tue, Jun 16, 2015 at 8:58 AM, Cruz Villanueva, Juan
> <ju...@hp.com> wrote:
>> one has seen this issue (or similar one) before?
> 
> Maybe https://bz.apache.org/bugzilla/show_bug.cgi?id=56287 ?
> 
> Regards,
> Yann.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] RE: Apache Reverse Proxy deletes from code

Posted by "Cruz Villanueva, Juan" <ju...@hp.com>.
Hello Yann,

Thanks for your reply.

I'll review this link. It's really possible that it's related

I'll post my findings later.

Thanks.

Juan Cruz Villanueva

-----Original Message-----
From: Yann Ylavic [mailto:ylavic.dev@gmail.com] 
Sent: martes, 16 de junio de 2015 9:09
To: users@httpd.apache.org
Subject: Re: [users@httpd] RE: Apache Reverse Proxy deletes <meta http-equiv=“Content-type” content=“text/html; charset=utf-8” /> from code

On Tue, Jun 16, 2015 at 8:58 AM, Cruz Villanueva, Juan <ju...@hp.com> wrote:
>
> No one has seen this issue (or similar one) before?

Maybe https://bz.apache.org/bugzilla/show_bug.cgi?id=56287 ?

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] RE: Apache Reverse Proxy deletes from code

Posted by Yann Ylavic <yl...@gmail.com>.
On Tue, Jun 16, 2015 at 8:58 AM, Cruz Villanueva, Juan
<ju...@hp.com> wrote:
>
> No one has seen this issue (or similar one) before?

Maybe https://bz.apache.org/bugzilla/show_bug.cgi?id=56287 ?

Regards,
Yann.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] RE: Apache Reverse Proxy deletes from code

Posted by "Cruz Villanueva, Juan" <ju...@hp.com>.
Hi Nick,

Thanks for the answer.

Mod_ xml2enc is loaded in the httpd.conf:

LoadModule xml2enc_module modules/mod_xml2enc.so

Besides that, what do you mean with a "broken backend"?

Atte.

Juan Cruz Villanueva

-----Original Message-----
From: Nick Kew [mailto:nick@webthing.com] 
Sent: martes, 16 de junio de 2015 9:48
To: users@httpd.apache.org
Subject: Re: [users@httpd] RE: Apache Reverse Proxy deletes <meta http-equiv=“Content-type” content=“text/html; charset=utf-8” /> from code

On Tue, 2015-06-16 at 06:58 +0000, Cruz Villanueva, Juan wrote:
> No one has seen this issue (or similar one) before?

It appears you need mod_xml2enc in there.  It deals with precisely that problem.

You might also have an issue with a broken backend, though I can't tell that from what you posted.

--
Nick Kew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] RE: Apache Reverse Proxy deletes from code

Posted by Nick Kew <ni...@webthing.com>.
On Tue, 2015-06-16 at 06:58 +0000, Cruz Villanueva, Juan wrote:
> No one has seen this issue (or similar one) before?

It appears you need mod_xml2enc in there.  It deals with
precisely that problem.

You might also have an issue with a broken backend,
though I can't tell that from what you posted.

-- 
Nick Kew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org