XML Script logo
Using Apache Web server on Linux
Using a web server

X-Tract can be run by a web server to provide on-line script operation. We recommend that you set up your web server so that all .xst files are handled automatically by X-Tract. The following instructions assume that you are logged in as 'root' or that you have 'sudo' privileges where required.

Installing X-Tract

Copy the X-Tract executable (xtract) to your cgi-bin directory (typically /home/httpd/cgi-bin) and make sure it has executable privileges.

Associating the XMLscript icon with .xst

The XMLscript icon, in GIF format, is at apps/favicon.gif. This must be copied to Apache's designated icons directory, usually in /home/httpd/. Your copy of Apache may have been configured to put the icons directory elsewhere entirely: refer to its configuration files in /etc/httpd/conf/ for details. Then the extension .xst (the typical extension for XMLscript templates) must be associated with the GIF. See "Editing the configuration file" below.

Editing the configuration file

You must edit one of the Apache configuration files to add a 'handler' for '.xst' files. Add the following lines to the file /etc/httpd/conf/srm.conf.

AddHandler run_xst .xst
Action run_xst /cgi-bin/xtract

In addition, if you wish to associate the icon favicon.gif with the extension, add a line to the same file saying:

AddIcon /icons/favicon.gif .xst
Re-starting Apache

Re-start Apache, using the command /etc/rc.d/init.d/httpd restart.

Testing

Copy the webstart.xst file to Apache's html directory (usually /home/httpd/html) and point your browser at it (the location should be something like hostname/webstart.xst). The browser should display the same output as X-Tract would have done running the same file from the command line.

XML Script homepage | Documentation home | XML Script docs | Command list | Function list | X-Tract docs

X-Stream, X-Tract and XML Script are trade marks of DecisionSoft Limited
© Copyright 1998-2000 DecisionSoft Limited