Apache Windows ExtFilterDefine / Output / SED

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Apache Windows ExtFilterDefine / Output / SED

Postby Ancient » 10. November 2007 19:49

Hi,

a couple of question concerning Apache Windows (tried 2.0 and 2.2) using the mod_ext_filter.

- Apache runs as a Reverse Proxy and I need to rewrite a received HTML document.
- On Linux I am using sed and a simple Regex to "clean up" the HTML code. Works fine.

On an Apache Windows (running on W2K3) i tried the same, trying several Win32 Builds of SED.
The call (on win) is something similiar like this:

ExtFilterDefine cleanup mode=output intype=text/html cmd="c:/sed.exe s/search/replace/g"
SetOutputFilter cleanup

What happens is that either sed (and apache) hangs or nothing at all, depeding on the version of sed. The regex is fine, it works on
the command prompt. However Apache+Sed on windows seem not to work well together.

My question:

- Anybody of you successfully modified output html code using ExtDefineFilter (or something similiar) on a Windows machine? What
tool you were using?


Tnx a lot! I am really stuck on that topic...

Mike
Ancient
 
Posts: 3
Joined: 10. November 2007 19:48

Postby Wiedmann » 10. November 2007 20:39

Apache runs as a Reverse Proxy and I need to rewrite a received HTML document.

Use mod_proxy_html for this.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Ancient » 10. November 2007 20:47

Can mod_proxy handle any HTML Content or just links? I thought it was mainly used for rewriting URLs. I need to simply delete some data/tags from the html files.
Ancient
 
Posts: 3
Joined: 10. November 2007 19:48

Postby Wiedmann » 10. November 2007 21:06

Can mod_proxy handle any HTML Content or just links?

You are right, mod_proxy_html only handle links. For changing the content too, use mod_publisher instead.
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby Ancient » 11. November 2007 20:25

ok, tried using mod_publisher...but again i fail :( mod_publisher seems to do nothing, not even displaying an error.

I downloaded the module (and the req. files), added it to my httpd.conf (i am using apache 2.0):

LoadFile bin/zlib1.dll
LoadFile bin/iconv.dll
LoadFile bin/libxml2.dll
LoadModule publisher_module modules/mod_publisher-windows.so

My virtual host is working, looking like that:

- calls to www.somedomain.com are redirected to the local apache listening on port 80
- then rewritten to a local website (for testing purposes)
works so far
- now i need to replace the content in the retrieved content (removing the sessionid)

<VirtualHost 127.0.0.1:*>

ServerName www.somedomain.com
RewriteEngine on
RewriteRule /(.*) http://192.168.0.2/$1

#AddOutputFilter markup-publisher .html
#SetOutputFilter INFLATE;proxy-html;DEFLATE
RequestHeader unset Accept-Encoding

MLLogVerbose On
MLRewriteOptions +urls +attributes
MLRewriteRule SESSIONID= XYZ= iR

</VirtualHost>
Ancient
 
Posts: 3
Joined: 10. November 2007 19:48


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests