Configuring Apache HTTP Server or IBM HTTP Server with Cognos Analytics

After you complete this procedure, the server can handle requests for static files (such as .js, .html, .css), load balance requests to IBM Cognos Analytics, and route SSO requests through the IBM Cognos Analytics gateway code.

About this task

You can use one of the sample configuration files that are provided with IBM Cognos Analytics. The sample files are located in gateway_component_install_location/cgi-bin/templates where gateway_component_install_location is the directory where the gateway component is installed. The following table describes the sample files. Choose the file for your environment:
Environment Sample file name

Apache 2.2 non-SSO

cognos_apache22_loadbalance.conf

Apache 2.2 SSO

cognos_apache22_loadbalance_SSO.conf

Apache 2.4 non-SSO

cognos_apache24_loadbalance.conf

Apache 2.4 SSO

cognos_apache24_loadbalance_SSO.conf

IBM HTTP Server 9.0 non-SSO

cognos_IHS9_loadbalance.conf

IBM HTTP Server 9.0 SSO

cognos_IHS9_loadbalance_SSO.conf

The directories and aliases for Windows-based IBM HTTP Server (IHS) setups must be properly specified. For example, the alias ibmcognos needs to be set to /ibmcognos "c:/cognos_analytics_location/cognos/webcontent". Ensure that the forward slash (/) character is used in the path, and the location is enclosed in double quotation marks (" ").

Procedure

  1. Copy the sample configuration file associated with your gateway to apache_install_root/conf or ihs_install_root/conf directory, and rename it to cognos.conf.
  2. Open cognos.conf in a text editor, and change the BalancerMember directive to use https and a fully qualified domain name.
    For example,
    
    <Proxy balancer://mycluster>
    	BalancerMember https://ica-host1.domain:9300 route=1
    	BalancerMember https://ica-host2.domain:9300 route=2
    </Proxy>
    
  3. Ensure that the following section is present in the sample file.
    • For Apache HTTP Server:
      # Send default URL to service
      RewriteRule ^/ibmcognos/bi/($|[^/.]+(\.jsp)(.*)?) balancer://mycluster/bi/$1$3 [P] 
      RewriteRule ^/ibmcognos/bi/(login(.*)?) balancer://mycluster/bi/$1 [P]
      RewriteRule ^/ibmcognos/bi/(dashboard-print.html) balancer://mycluster/bi/$1 [P]
    • For IBM HTTP Server:
      # Send default URL to service
      RewriteRule ^/ibmcognos/bi/$ /bi/ [PT,L]
      RewriteRule ^/ibmcognos/bi/([^/.]+(\.jsp)(.*)?)  /bi/$1 [PT,L]
      RewriteRule ^/ibmcognos/bi/(login(.*)?) /bi/$1 [PT,L]
      RewriteRule ^/ibmcognos/bi/(dashboard-print.html) /bi/$1 [PT,L]
      
  4. Ensure that the following section is present in the sample file.
    # Rewrite Saved-Output and Viewer static references
    RewriteRule ^/ibmcognos/bi/rv/(.*)$ /ibmcognos/rv/$1 [PT,L]

    If this section is missing, add it after the # Rewrite Event Studio static references section.

  5. If you want to integrate Cognos® Analytics for Jupyter Notebook Server, in an Apache 2.4 sample file, complete the following steps:
    1. Locate the # Rewrite jupyter websocket requests directly to jupyter server section.
    2. In this section, uncomment the line #RewriteRule ^/ibmcognos/bi/v1/jupyter/(user/[^/]*)/(api/kernels/[^/]+/channels)(.*) ws://ica-jupyter-host.domain:8000/bi/v1/jupyter/$1/$2$3 [P,L]
    For more information, see Configuring Jupyter Notebook Server.
    Important: Starting with Cognos Analytics version 11.1.6, Jupyter Notebook supports only Apache 2.4 gateways.
  6. Find the Directory section and make sure it is pointing to the IBM Cognos Analytics installation location.
  7. Save the cognos.conf file.
  8. Configure httpd.conf, as documented in the article Configuring Cognos Analytics with either Apache HTTP Server or IBM HTTP Server.