| XSSCRIPTS(5) | FreeBSD File Formats Manual | XSSCRIPTS(5) |
So webservers offer Server-Side Includes, to allow conditional blocks, page counters and even output from external programs in HTML text (see httpd(1) for a full overview). But even SSI's may not offer all the flexibility that people look for, so it is possible to include your own programs (be it shell scripts, compiled C progs, PHP or anything else you can start from Unix prompt) by placing them in the /cgi-bin subdirectory.
Rather than being confined to a single directory, XS-httpd also offers a flexible mechanism to let the users specify which files should be executed and which should be offered with full source to the website visitor. This allows you a per-file configuration so that you can have any file interpreted as a program, rather than being confined to the /cgi-bin directory, which is more typing and a also clear indication to any visitor that it is a program.
Users can include the interpretation settings through a .xsscripts file which may be placed in any html directory. The settings apply recursively to all subdirectories. The system administration may also include global settings through the script.methods file in the main XS-httpd configuration directory. This may be convenient if you want, for instance, all *.php files to be parsed by a PHP interpreter.
Additional command line options may not be specified in the configuration file. In order to supply extra parameters to the interpreter, one must write a wrapper script that handles these options. The interpreter will be executed from the directory containing the requested file; with the appropriate filename as the single argument.
/usr/local/bin/perl .pl
Lines starting with ‘#' will be ignored as comments.
The special extension ‘*' is supported to indicate a default interpreter program that should handle all files for which no other interpreters are specified. Note that the directive
internal:exec *practically turns a normal directory into a cgi-binary directory.
404 Not Found' error whenever a matching file is requested. This can for instance be used for files that are only included in other HTML files (standard header or footer) and never requested directly. Give these a special extension like .htmliThe project homepage: http://www.xs-httpd.org/
| June 12, 2002 | xs-httpd/3.5 |