This is the README for the Zeus SPECweb99 ISAPI code.

----------------------------------------------------------------------

(c) Zeus Technology Limited 2000-2001.  All rights reserved.

Copyright in the source code ("the Source Code") listed below in whatever
form, whether printed electronic compiled or otherwise, belongs to Zeus
Technology Limited ("we"/"us").

If you have entered into a written agreement with us under which the Source
Code is licensed to you ("Licence"),  you may not use, sell, license,
transfer, copy or reproduce the Source Code in whole or in part or in any
manner or form other than in accordance with your Licence.  To do so is
strictly prohibited and may be unlawful and a serious criminal offence.

If you have not entered into a Licence, disclosure of the Source Code is
made "as is".   You may use the Source Code for non-commercial purposes
only.  You may distribute the Source Code to individual third parties for
their non-commercial purposes only, but only if (1) you acknowledge our web
site as the source of the Source Code and include such acknowledgement and
our web address (www.zeus.com) in any copy of the Source Code; (2) the
Source Code you distribute is complete and not modified in any way and
includes this notice; and (3) you inform such third parties that these
conditions apply to them and that they must comply with them.

If you have not entered into a Licence, all express and implied warranties,
conditions, terms, undertakings and representations, including without
limitation as to quality, performance, fitness for purpose, or
non-infringement, are excluded to the fullest extent permitted by law.
Neither we nor any other person involved in disclosing the Source Code shall
have any liabilities whatsoever to you, howsoever arising, in connection
with the Source Code, or its use by you.

If you have not entered into a Licence but would like to do so,  please
contact us at pepp@zeus.com.

----------------------------------------------------------------------

 Installing
------------

Note that this ISAPI code _requires_ you to have Zeus 3.3.7 or later
installed, as it makes use of enhancements introduced with 3.3.7.

First of all run the configure script:
	bash$ ./Configure

There are a few options configure knows about:
	bash$ ./Configure --sendfile=yes|no
	bash$ ./Configure --checkconfig=yes|no
	bash$ ./Configure --locking=flock|semop

'sendfile' specifies whether the CGI program nph-zeus.cgi will use
sendfile, if it is supported on your platform; on some platforms
(currently HP-UX and AIX) it is enabled by default.

'checkconfig' specifies whether the ISAPI programs will check the web
server global.cfg file (a sanity check).

'locking' specifies which locking mechanism is used to lock the post.log;
the best strategy may vary from platform to platform.

Finally compile the ISAPI executables:
	bash$ make

This creates THREE separate ISAPI executables:
	zeus-get.api	handles the GET requests
	zeus-cad.api	handles GET with custom ad. rotation
	zeus-post.api	handles the POST requests
and TWO CGI executables:
	zeus-house.cgi	handles housekeeping requests (Reset, Fetch)
	nph-zeus.cgi	handles standard dynamic CGI GET
You should also have ONE installation script:
	spec_install

In order to install these files, you need to run spec_install and
specify the docroot of your SPECweb99 installation. Manually copying
the binaries into the docroot will not work, as the install script
performs some site-specific configuration. The Zeus code assumes the
following docroot layout:

	/space/specweb			This is the docroot you specify
	/space/specweb/cgi-bin		Where the CGI files are installed
	/space/specweb/isapi-bin	Where the ISAPI files are installed
	/space/specweb/post.log		The POST log
	/space/specweb/upfgen99		Invoked on Reset
	/space/specweb/User.Personality	Generated by upfgen99
	/space/specweb/cadgen99		Invoked on Reset
	/space/specweb/Custom.Ads	Generated by cadgen99

Note that the zeus-house.cgi executable needs to be installed with
sufficient privileges to send signals to the web server. If the web server
is started as root, the executable will therefore need to be setuid root,
and you will need to run the install script as root.

You need to set your website to point to the right location, and also
set the SPEC run to use separate commands for each type of request:

	DYN_GET_SCRIPT=.../isapi-bin/zeus-get.api
	DYN_CAD_SCRIPT=.../isapi-bin/zeus-cad.api
	DYN_CMD_SCRIPT=.../cgi-bin/zeus-house.cgi
	DYN_POST_SCRIPT=.../isapi-bin/zeus-post.api
	DYN_CGI_SCRIPT=.../cgi-bin/nph-zeus.cgi


 Running
---------

When the ISAPI programs are first loaded by the web server, it will
perform a "consistency check" on your global.cfg file. Specifically,
this is to check for tunable parameters being set to 'appropriate'
values. The purpose of this is to try and screen out 'bad' SPEC runs -
it forces one to think about the Zeus tunables. These are reported via
the web server error logs: if you see messages similar to:

SPEC: global.cfg: tuning!unique_bind is 0, recommended 1

in your error log file, then it may be worth checking the tunables you
have set in $ZEUSHOME/web/global.cfg

Of course, if the 'appropriate' values as set by us do not suit your
platform feel free to ignore the warnings - it will not prevent the
SPEC run from completing.
