DragonFly On-Line Manual Pages

Search: Section:  


XSSCRIPTS(5)             DragonFly File Formats Manual            XSSCRIPTS(5)

NAME

.xsscripts - XS-httpd file interpreter settings

DESCRIPTION

Traditionally all files in a user's .html directory contain static data. Mostly HTML markup data, but also images and archives. However most people desire more than only static HTML. 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. File Layout Every line contains the name of the interpreter that should be run, and a suffix of the filenames from the html directory that are to be handled by this interpreter. To have all files with the extension .pl interpreted by Perl, add the following line: /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. Built-in Interpreters Apart from external programs, several built-in directives can be specified as well, to handle files with a certain extension in a special way. The directives that can be used are: internal:404 To generate a `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 .htmli internal:text Treat as a normal document rather than an executable CGI. This allows you to present HTML documents in a cgi-bin directory. The directive can also be used to overridden global settings or more general matching rules. internal:exec Directly execute the program, without an interpreter. The files with a matching extension should have the execute bit set with chmod(1).

FILES

script.methods Global configuration file with interpreter directives, located in SystemRoot/conf/. .xsscripts Local configuration file with interpreter directives, located in any html data directory.

SEE ALSO

httpd(1), xsconf(5), mime.types(5), httpd_cgi(7) The project homepage: http://www.xs-httpd.org/ xs-httpd/3.5 June 12, 2002 xs-httpd/3.5

Search: Section: