README for mod_aolserver

an Apache module by Robert S. Thau and Rob Mayoff
This is mod_aolserver release 1.1, an Apache module that emulates enough of the AOLserver API to run the ArsDigita Community System. You can try out an ACS installation running on this module at http://apache.arsdigita-dev.com/. That system has bulletin boards for discussing mod_aolserver.

Prerequisites

In order to use this software, you will need these other packages: You must install these packages before compiling mod_aolserver.

Apache

Apache is available here.

We developed mod_aolserver as a dynamic shared object, so you must compile/install Apache with mod_so built in. You can determine whether your Apache has this module by running this command:

httpd -l | grep mod_so
If the output is a line that says mod_so.c, then your Apache has the required module.

We test with Apache 1.3.12 so you should try to use that or a later version.

Tcl

Tcl is available here.

AOLserver uses Tcl 8.3, so that's what I use to build mod_aolserver. It will probably work with Tcl 8.1 or later, but ACS might (now or in the future) use 8.2 or 8.3 features. Whichever version you use, make sure you build this with --enable-shared.

Warning: Red Hat Linux, through version 6.2 at least, only includes Tcl 8.0, so if you're on a Red Hat system, you must install a later version. You do not need to uninstall the Tcl RPM, though; you can install Tcl 8.3 somewhere else for mod_aolserver's use.

MM

The MM library is available here.

AOLserver provides various APIs for threads to share data and synchronize their operations. Although Apache is not threaded, we emulate some of those APIs. The mechanism we use to share data between processes is Ralf Engelschall's MM.

We tested with MM version 1.1.1.

Note: if you are using Linux, MM will by default use System V style SHM shared memory. This work fine. Do not try to force it to use MAP_ANON shared memory. I had strange problems when I did that.

Oracle 8i

Oracle 8i is available here.

The ArsDigita Community System is built on top of Oracle 8i. mod_aolserver includes a version of ArsDigita's Oracle driver. If you want to run the ACS on mod_aolserver, you'll need Oracle 8i installed before compiling mod_aolserver.

As of release 1.1, mod_aolserver uses ArsDigita's AOLserver Oracle driver release 2.3.

PostgreSQL

PostgreSQL is available here.

An intrepid group of programmers are porting the ACS to PostgreSQL; they call the project "OpenACS". You can download that version from their development site. mod_aolserver includes a version of the PostgreSQL database driver. If you want to run OpenACS on mod_aolserver, you'll need PostgreSQL installed before compiling mod_aolserver.

Compiling and Installing

mod_aolserver uses GNU autoconf to configure the build process. You can type ./configure --help to see your options. The important ones are these:

In my test environment, I have private copies of Tcl, Apache, and MM, so my typical configure command looks something like this:

./configure \
  --with-database=ora8 \
  --with-tcl=/u/mayoff/test/lib \
  --with-apxs=/u/mayoff/test/bin/apxs \
  --with-mm=/u/mayoff/test
After running configure, you should just be able to run make. It will compile the module and install it in your existing Apache installation using apxs.

Configuring Apache

mod_aolserver provides two request handlers: You must enable ExecCGI for these handlers to work. Neither of these handlers is really necessary if you're running ACS, because ACS uses ns_register_proc to handle all requests for .tcl and .adp files anyway.

mod_aolserver needs an AOLserver configuration file, in either .tcl or .ini format. You must specify the location of the file using the AolServerConf config_file directive in your httpd.conf:

AolServerConf config_file /u/mayoff/test/nsd.tcl
  or
AolServerConf config_file /u/mayoff/test/nsd.ini
Either of these files can contain an AuxConfigDir parameter, which mod_aolserver will process just like AOLserver would. You'll need that parameter if you want to run ACS.

Here's an httpd.conf excerpt to get you started. Assume that I have installed Apache in /u/mayoff/test and the ACS in /u/mayoff/test/acs.

# This is added automatically by apxs when you `make' or `make install':
LoadModule aolserver_module libexec/mod_aolserver.so

AolServerConf config_file /u/mayoff/test/nsd.ini

# The following setting is returned by [ns_info log]
AolServerConf log_file_location /u/mayoff/test/logs/error_log

# Note: Make sure that PageRoot in your nsd.ini is set
# to the same thing as this DocumentRoot.
DocumentRoot "/u/mayoff/test/acs/www"

<Directory "/u/mayoff/test/acs/www">
    Options Indexes FollowSymLinks MultiViews ExecCGI
    DirectoryIndex index.tcl index.adp index.shtml index.html index.htm
    AddHandler adp adp
    AddHandler aolserver tcl
</Directory>
This should cause mod_aolserver stuff to run only in the virtual server containing the AolServerConf directive (or the main server only if you put it outside a virtual server section). You're probably better off running this in the main server of a test Apache installation right now, rather than running it in a virtual server of your production installation.

Configuring mod_aolserver

Configuring mod_aolserver is pretty straightforward. The module will load whatever configuration file you specified with the AolServerConf config_file directive in your Apache configuration. The config file can be in either .ini or .tcl format. Many AOLserver configuration directives have no effect under mod_aolserver, but they will not be detrimental either.

A sample configuration file can be found in the mod_aolserver distribution as tcl_modules/nsd.ini.sample. You should be able to use that config file, with some site-specific modifications, to run ACS on Apache.

Be sure to disable the watchdog in your ACS configuration (by setting WatchDogFrequency to 0) or you'll get a lot of mail. The Apache error log is formatted differently than the AOLserver error log, so the watchdog parser doesn't work.

Also, if you're using the Oracle database driver, you may encounter problems if you leave the datasource empty. On my test system running Red Hat Linux 6.2 and Oracle 8.1.6, I found that Apache would either hang or dump core during startup. It turns out to be a problem with the "Bequeath Protocol", which is the way that the driver talks to Oracle if you leave the DataSource blank.

The workaround for using Oracle is to set the DataSource in your database pools to a TCP or IPC connection. This means you need to know a little bit about configuring Net*8 if you haven't done so before. The configuration assistant, netasst, is pretty good in Oracle 8.1.6, so you shouldn't have too much difficulty. If you run into trouble, you can try asking for help at the ACS on Apache web site or Web Tools Review.

Limitations, Bugs and To-Do List

Send bug reports and other feedback to mod_aolserver@arsdigita.com.

Here are the known limitations, bugs, and to-do tasks.



$Header: /usr/local/cvsroot/mod_nsd/Attic/README.html,v 1.1.1.1 2001/04/13 21:09:32 ppetru Exp $
mod_aolserver@arsdigita.com