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: Body tag problem with proxy. Bug?
Author
MeSo2



Joined: 28 Apr 2016
Posts: 12

PostPosted: Wed 22 Jun '16 17:31    Post subject: Body tag problem with proxy. Bug? Reply with quote

I need to setup an internet-exposed server so it will proxy requests to an internal server.

It is almost working, but somehow the normalisations is stripping out the body tag from all values.

This is what I am doing: my.com:81 proxy to 192.168.1.2:81
Code:
LoadModule  proxy_module         modules/mod_proxy.so
LoadModule  proxy_http_module    modules/mod_proxy_http.so
LoadModule  headers_module       modules/mod_headers.so
LoadModule  deflate_module       modules/mod_deflate.so
LoadModule  xml2enc_module       modules/mod_xml2enc.so
LoadModule  proxy_html_module    modules/mod_proxy_html.so

<VirtualHost *:81>
  ProxyHTMLEnable  on   
  ProxyRequests    off
  ProxyPass        / http://192.168.1.2:81/
  ProxyPassReverse / http://192.168.1.2:81/
  ProxyHTMLURLMap  http://192.168.1.2:81 http://my.com:81
  SetOutputFilter  proxy-html
  RequestHeader    unset  Accept-Encoding
</VirtualHost>

Body tag problem with proxy. Now I am only getting this:
Code:
<body>

this is what it should be:
Code:
<body text="#999999" and more... >
Back to top
James Blond
Moderator


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

PostPosted: Sat 25 Jun '16 22:10    Post subject: Reply with quote

text="....

That is a valid html tag. So you need mod_proxy_html? Sure that module is causing it. You can adjust the rules for cleaning.
Back to top
MeSo2



Joined: 28 Apr 2016
Posts: 12

PostPosted: Sun 26 Jun '16 19:51    Post subject: Reply with quote

I had mod_proxy_html loaded. (Sorry, I did not list it as loaded in my post.)

I do have no cleaning rules defined. Do I need to do that?

I have javascript inside some of my <body> tags - this stripping of the body tag make parts of the website useless.
Back to top
James Blond
Moderator


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

PostPosted: Tue 28 Jun '16 11:22    Post subject: Reply with quote

I had so far no need to change the rules. I use valid html. I haven't tested it, but in theory thr html5 data-text should work.

The docs are at https://httpd.apache.org/docs/2.4/mod/mod_proxy_html.html and http://apache.webthing.com/mod_proxy_html/
Back to top


Reply to topic   Topic: Body tag problem with proxy. Bug? View previous topic :: View next topic
Post new topic   Forum Index -> Apache