Configuring Net.Data for FastCGI

Net.Data can execute as a FastCGI process on Apache Web Server and Domino Go Webserver. FastCGI provides similar performance to the other Web API programs with the application isolation of CGI. FastCGI is supported on the AIX and Sun Solaris operating systems.

Before you use FastCGI, ensure that you have installed the Apache Web Server 1.2.0 or higher or the Domino Go Webserver 4.6.2.5 or higher.

To configure Net.Data for FastCGI:

  1. Configure the Web server and FastCGI configuration file for your operating system:

    For Apache Web server:
    Update the http.conf file.
    • Declare the new application:
      AppClass inst_dir
      -processes proc_num
      -initial-env LIBPATH=libpath
      -initial-env ORACLE_HOME=oracle_path
      -initial-env ORACLE_SID=oracle_instance
      -initial-env DB2INSTANCE=db2_instance
      -initial-env RXQUEUE_OWNER_PID=REXX_perf_var
      -initial-env LANG=locale
       
      
    • Declare the FastCGI module:
      <location /fcgi-bin>
      SetHandler fastcgi-script
      </location>
      

    For Domino Go Webserver:
    Update the httpd.conf and fcgi.conf files:
    • In the httpd.conf file, declare the service section:
      ServerInit /u/mydir/http/fcgi-bin/fcgi.o:FCGIInit
      /u/mydir/http/fcgi.conf service/fcgi-bin/*
      /u/mydir/http/fcgi-bin/fcgi.o:FCGIDispatcher*ServerTerm
      /u/mydir/http/fcgi-bin/fcgi.o:FCGIStop
      
    • In the fcgi.conf file, declare the application:
      Local {
      Exec inst_dir
      Role Responder
      URL /fcgi-bin/db2www
      BindPath /tmp/db2www.ibm
      NumProcesses proc_num
      Environ LIBPATH=libpath
      Environ ORACLE_HOME=oracle_path
      Environ ORACLE_SID=oracle_instance
      Environ DB2INSTANCE=db2_instance
      Environ RXQUEUE_OWNER_PID=REXX_perf_var
      Environ LANG=locale
      Environ NLSPATH=msg_catalog_path
      Environ MAXREQUEST=num_reqs
      }
      
    Parameters:

    inst_dir
    The path and directory name for Net.Data's executable files.

    For Apache:

    AppClass /u/mydir/apache/fcgi-bin/db2www
    

    For Domino Go Webserver:

    Exec /u/mydir/http/fcgi-bin/db2www
    

    Role Responder
    Required keyword for Domino Go Webserver, only.

    URL
    Required keyword and URL address for Domino Go Webserver, only. The URL points to the path specified for the EXEC_PATH statement.

    BindPath
    Required keyword and path statement for Domino Go Webserver on AIX only. The path of the unique UNIX socket used by Net.Data and FastCGI.

    proc_num
    The number of requests that can be handled simultaneously. The default is 1, but should be increased to improved performance, based on your application requirements. See Using FastCGI for tuning information.

    For Apache:

    -processes 7
    

    For ICS or Domino Go Webserver:

    NumProcesses 7
    

    libpath
    The LIBPATH (shared library or DLL) statements declared in each ENVIRONMENT statement in the Net.Data initialization file. When accessing DB2, the LIBPATH statement should contain the path to the DB2 library directory. For example:
    /usr/lpp/db2_05_00/lib
    

    For Apache:

    -initial-env LIBPATH=/u/mydir/apache/lib:/u/mydir/apache:/usr/lib
    

    For Domino Go Webserver:

    Environ LIBPATH=/u/mydir/http/lib:/u/mydir/http:/usr/lib
    

    oracle_path
    Required when using Oracle. The path and directory of the Oracle database executable files.

    For Apache:

    -initial-env ORACLE_HOME=/home.native/oracle/product/7.2
    

    For Domino Go Webserver:

    Environ ORACLE_HOME=/home.native/oracle/product/7.2
    

    oracle_instance
    Required when using Oracle. The instance of the Oracle database. You must use Live Connection for Oracle.

    For Apache:

    -initial-env ORACLE_SID=mvpdb2 
    

    For Domino Go Webserver:

    Environ ORACLE_SID=mvpdb2
    

    db2_instance
    Required when using DB2. The instance of the DB2 database.

    For Apache:

    -initial-env DB2INSTANCE=wwwinst 
    

    For Domino Go Webserver:

    Environ DB2INSTANCE=wwwinst 
    

    REXX_perf_var
    Required when using REXX on AIX. The performance variable is used with FastCGI and REXX on the AIX operating system. The default is 0. For other products and operating systems, declare this variable in the Net.Data macro. See Appendix B, Net.Data for AIX for more information about this variable.

    For Apache:

    -initial-env RXQUEUE_OWNER_PID=0
    

    For Domino Go Webserver:

    Environ RXQUEUE_OWNER_PID=0        
    

    locale
    The UNIX locale variable. Use En_US for U.S. English.

    For Apache:

    -initial-env LANG=En_US
    

    For Domino Go Webserver:

    Environ LANG=En_US
    

    NLSPATH
    Specifies the directory location of the message catalog.

    For Apache:

    -initial-env NLSPATH=/usr/lib/nls/msg/%L/%N
    

    For Domino Go Webserver:

    Environ NLSPATH=/usr/lib/nls/msg/%L/%N
     
    

    MAXREQUEST
    Specifies the number of requests the Net.Data Fast-CGI process will serve before the Web server recycles the process and starts a new one.

    For Apache:

    -initial-env MAXREQUEST=5000
    

    For Domino Go Webserver:

    Environ MAXREQUEST=5000
     
    
  2. For Apache: Add the fgi-bin directory as a new script alias in the srm.conf file: ScripAlias /fcgi-bin/ /u/mydir/apache/fci-bin
  3. Migrate any hyperlinks in static or dynamically generated Web pages from CGI-BIN to FCGI-BIN. For example:
    <a href="http://server/fcgi-bin/db2www/filename.ext/block/
    [?name=val&...]">any text</a>
    
  4. Modify end-user documentation for URL invocations of Net.Data with FCGI-BIN instead of CGI-BIN. For example:
    http://server/fcgi-bin/db2www/filename.ext/block/[?name=val&...]
    


[ Top of Page | Previous Page | Next Page | Index ]