Instrumenting an IBM HTTP Server v9.x (and above) Using Container-Assisted Injection

Container-assisted RUM script injection can be used to RUM-enable only those web servers that support the mod_substitute and mod_filter modules. If a web server does not support these modules or supports only one of them, then such web servers cannot be RUM-enabled using the container-based injection method.

The IBM HTTP server 8.x (and below) does not include the mod_substitute module. This means that the container-based injection method cannot be used to RUM-enable this server. You will hence have to use one of the alternate approaches depicted by Figure 192 to RUM-enable the IBM HTTP server 8.x (and below).

In the case of the IBM HTTP server 9.x (and above) on the other hand, both the mod_substitute and mod_filter modules are supported. The container-based injection method can hence be used here. Use the procedure detailed below to RUM-enable the IBM HTTP server 9.x (and above):

  1. Open the global httpd.conf file (in the <IBM_HTTP_SERVER_INSTALL_DIR>HTTPServer\conf directory) and search for the following commands:

    LoadModule substitute_module modules/mod_substitute.so

    LoadModule filter_module modules/mod_filter.so

  2. Once you find the commands, uncomment them.
  3. Then, append a following <Location> directive to the httpd.conf file. A sample directive is given below:

    <Location />

    AddOutputFilterByType SUBSTITUTE text/html

    substitute "s|</head>|<script> window['egrum-start_time'] = new Date().getTime();window['Site_Name'] = ‘57bf9bbe-5712-40e9-929b-f75c5ab300e9-1606389009637';window['beacon-url'] = 'http://RUM_COLLECTOR_DOMAI</head>|<script charset='UTF-8' type='text/javascript'>

    window['egrum-start_time'] = new Date().getTime();

    window['Site_Name'] = 'SITENAME';

    window['beacon-url'] = 'http://RUM_COLLECTOR_DOMAIN_NAME:PORT';

    if(!window['egrum-config']) window['egrum-config'] = {}; (function (config) {config.capture = { jsError:true, resourceDetails:true, ajax:true, ajaxCorrelation:false, overwriteBtmUName:false, excludeURLPattern:'none', ajaxExcludeURLPattern:'none', includeURLPattern:'*'};})(window['egrum-config']);

    </script>

    <script src='http://RUM_COLLECTOR_DOMAIN_NAME:PORT/rumcollector/egrum.js' async></script></head>|inq"

    </Location>

    In the sample contents above, the </head>tag highlighted in Red indicates that this code snippet looks for an exact </head> tag match. Alternatively, you can alter the code snippet to look for a <body> tag match, if required.

    Also, when inserting the code snippet, take care to replace the area highlighted in Green with the exact domain name and port number of the RUM collector.

  1. Finally, save the file and restart the IBM HTTP server.