Home Contact
Validate the HTML of this page

Tomcat WebVoyáge

Apache Configuration for CGI

Unlike the classic WebVoyáge that used Pwebrecon.cgi, the Tomcat WebVoyáge is not dependent on CGI programs. Because of that, your Tomcat Apache is not configured to run CGI programs.

There may however, be CGI programs you want, or need to run. These include external patron authentication adaptors, the New Books List, ShelfLister and the Short Loans Schedule.

Configuration "How To"

  The following steps will require root user access.
  {xxxdb} == your db name

  Edit the appropriate Apache {xxxdb}_vwebv_httpd.conf file in
  (save a copy of the file before making any changes)

  Add the following within the vwebv <VirtualHost *:{port}> section:

        # Allow for execution of CGI scripts, such as:
        #  - external patron authentication adaptor
        #  - New Books List
        #  - ShelfLister, etc. 
        AddHandler cgi-script .cgi
        <Directory "/m1/voyager/{xxxdb}/tomcat/vwebv/context/vwebv/htdocs">
                Options MultiViews
                AllowOverride None
                Options ExecCGI
                Order allow,deny
                Allow from all

  Verify that the Apache configuration changes are okay by checking
  the syntax:

      /m1/shared/apache2/bin/apachectl -t

  If the syntax is okay, then restart Apache:

      /m1/shared/apache2/bin/apachectl restart

  If the syntax is NOT okay, either make corrections until it is
  okay, or revert back to a saved copy of the configuration file. 
  Note: A "ScriptAlias" directive is not a viable alternative for
  the "AddHandler cgi-script .cgi" directive; the newBooks.cgi script
  needs to run in the same 'virtual' URL path as the other vwebv 
  WebVoyage executables.

Important: Apache config JkMount directive

Your Apache {xxxdb}_vwebv_httpd.conf file will contain a JkMount
directive.  It will look like either this:

  # JKMounts
  JkMount /vwebv/* ajp13_lb_xxxdb_vwebv

or this:

  # JKMounts
  Include conf/ConfiguredVirtualHosts/xxxdb.jkmounts.conf

If it is the first one, no CGI scripts will function in the vwebv
directory unless you *add* this directive below the JkMounts directive:

  JkUnMount /vwebv/*.cgi ajp13_lb_xxxdb_vwebv

This JkUnMount directive exempts files with a ".cgi" file extension 
from being sent to Tomcat for processing. 

As always, check your syntax and restart Apache for changes to take

If it is the second one, it is important to be aware that
the FILE NAMES for any CGI scripts that you place in the 
directory MUST NOT CONFLICT with the file stems listed in the Apache
configuration file.

For instance, if your external patron authentication script is named
"login.cgi", then you will have to rename it, since "log*" is one of
the file stems in the {xxxdb}.jkmounts.conf file.  Either that, or you 
can try placing your script in a different subdirectory under htdocs.