FastCGI
THT may be used with FastCGI and thus avoid overhead from exec
and the initial program parse and compile of THT source.
If you can't use FastCGI, you can emulate it with SockCGI
or use THS to eliminate dependance on web servers at all.
Setup
Download and install the Fcgi tcl package:
fcgi.tcl-0.4.tar.gz
If necessary, setup FastCGI on your web server (see below).
Then unzip the tht directory into your fcgi-bin directory and change
ownership to that of the web server.
Then add the following to your httpd.conf or root .htaccess file:
AddHandler tht-script .tht
Action tht-script /fcgi-bin/Mod/tht/fcgi.tcl
You should now be running a persistant copy of THT.
Installing Apache FastCGI
For apache, mod_fcgid may be obtained from http://fastcgi.coremail.cn/.
Make sure you checkout the version from CVS as there are known issues with
the stable release.
After building and installing add the following to httpd.conf:
SharememPath /var/run/fcgid_shm
LoadModule fcgid_module /usr/lib64/apache2/mod_fcgid.so
<Location /fcgi-bin>
SetHandler fcgid-script
Options ExecCGI
allow from all
</Location>
© 2008 Peter MacDonald