Skip to content

WebTrends SDC behind Reverse Proxy

With WebTrends SmartSource Data Collector it is possible to write log files of your Web Application, that include many client side parameters. Like: screen resolution, language settings and several other default and custom build parameters. This technology is also often called Pixel Tracking.

To build this logs, you get a custom Webserver (Apache on Linux and Solaris - A module for IIS on Windows) that is not really configurable. And especially you cannot update the Apache underneath. Or even worse, would you like to put a Windows Server in your DMZ?

So the solution seems simple. Just place a reverse Proxy in front of it and keep this Server up to date and secure. There is one major drawback with this way, you loose the Client IP Address! This is also the case if you use a CDN (eg. Akamai). Since a CDN acts like a reverse Proxy the same trade-offs apply.

Thankfully there are options within the SDC that let you pass the Client IP as a custom HTTP Header. If you use Akamai you simply need to set this in EdgeControl. The Option is called "True Client IP Header" and by default it is set to "True-Client-IP". So the HTTP Request Header "True-Client-IP" holds the original client IP and you only need to read it.

To tell SDC to read this Header instead of the normal IP you have to edit the configuration of SDC. In you SDC installation directory you should find the file cfg/sdc.cfg. There you have to edit the [logserver] section.


After this is done, SDC will log the right Client IP Addresses.

If you use a Apache reverse Proxy you can create the "True-Client-IP" header with some rewrite magic.

RewriteEngine on
RewriteCond %{REMOTE_ADDR} (.*)
RewriteRule .* - [E=REMOTE_ADDR:%1]
RequestHeader set True-Client-IP %{REMOTE_ADDR}e
RewriteRule ^/(dcs.*)$ http://SDCSERVER:SDCPORT/$1 [P,QSA,L] 

This configuration extracts the Client IP Address and saves it into a environment variable. Afterwards this variable is placed in the HTTP Header. I found no direct way to do this, only with the use of a environment variable.

Well, it works that's what matters :-)


Keine Trackbacks


Ansicht der Kommentare: Linear | Verschachtelt

Noch keine Kommentare

Die Kommentarfunktion wurde vom Besitzer dieses Blogs in diesem Eintrag deaktiviert.

Kommentar schreiben

BBCode-Formatierung erlaubt
Standard-Text Smilies wie :-) und ;-) werden zu Bildern konvertiert.