Monday, 14 May 2012

Cognos Content Caching in Apache 2.2

Step 1: 
  •  Open the Apache configuration file 'httpd.conf' with a text editor.
  • Find the line which reads `#LoadModule file_cache_module modules/mod_file_cache.so`
  • Remove the # from the beginning of the line so it reads  
Step 2:
  • In Command Prompt , run the following
 FOR /F "Tokens=* Delims=" %i in ('dir /S "C:\Program Files\ibm\cognos\c10\webcontent\pat\images" /A -D /B') DO @echo MMapFile "%i" >> "C:\Program Files\Apache Software Foundation\Apache2.2\conf\file_cache.lst"

Step 3:
  •  Open the Apache configuration file 'httpd.conf' with a text editor.
  • Add the line
    • include "C:\Program Files\Apache Software Foundation\Apache2.2\conf\file_cache.lst"
  • Save the `httpd.conf` file.
Step 4: Restart Apache  Http Server to enable Caching

Configuring Cognos 10.1 with Apache 2.2 Module

Creating  Cognos Configuration   file

Step 1: Open Notepad   and paste the below content

# Apache Configuration for IBM Cognos 10.1

LoadModule cognos_module "C:/Program Files/ibm/cognos/c10/cgi-bin/mod2_2_cognos.dll"

# Set some directory aliases and security settings

ScriptAlias /ibmcognos/cgi-bin "C:/Program Files/ibm/cognos/c10/cgi-bin"
Alias /ibmcognos "C:/Program Files/ibm/cognos/c10/webcontent"


Options Indexes MultiViews
   AllowOverride None
   Options None
   Order allow,deny
   Allow from all



    AllowOverride None
    Options None
    Order allow,deny
    Allow from all


Alias /Documentation "C:/Program Files/ibm/cognos/c10/documentation"

   
    Options Indexes MultiViews
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all



# Enable the gateway diagnostics


      SetHandler cognos-handler
    Order allow,deny
    Allow from all


# Configure the user directory


  CGIBinDir "C:/Program Files/ibm/cognos/c10/cgi-bin"
 


Step 2: Save the notepad with name "Cognos.conf"  under   "C:\Program Files\Apache Software Foundation\Apache2.2\conf" folder

Step 3: Add the following line Include "C:/Program Files/Apache Software Foundation/Apache2.2/conf/cognos.conf"   to  "C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf" file

Step 4:
Open Cognos Configuration and change the  end of the `Gateway URI` from

cgi-bin/cognos.cgi to cgi-bin/mod2_2_cognos.dll

 Step 5: Restart Cognos Services and Apache HTTP Server


Step 6: Using this url  to access cognos http://servername/ibmcognos/cgi-bin/mod2_2_cognos.dll