<commit_before>
Sighttpd Administrator's Guide
==============================

By default, the configuration file is looked for in /etc/sighttpd/sighttpd.conf
You can override this with the -f commandline option to sighttpd:

$ sighttpd -f /path/to/configfile


1. Syntax
---------

Comments are marked with a '#' character, and continue to the end of line.

Configuration directives are single keywords followed by whitespace and a
value (to the end of the line, or comment character). The directive name
(ie. keyword) is case insensitive.

Configuration is grouped in blocks; the names of directives are scoped within
a configuration block. Any configuration directives outside of a block are
global to the entire configuration. Block names are case insensitive.

For example, the configuration file:

-----
Listen 3000

<StaticText>
	Path "/welcome.txt"
	Text "Hello, world!"
</StaticText>
-----

specifies one global directive ("Listen 3000"), and one block ("StaticText").
Within that block, the directives "Path" and "Text" appear.


2. Stdin: Configuring streaming from standard input
---------------------------------------------------

This section explains how to configure streaming of data from stdin with
three examples:

	1. plain text
	2. H.264 video
	3. Motion JPEG

2.1. Streaming text updates

This configuration prints a timestamp every second. The content appears at
the path /date.txt (eg. http://localhost/date.txt):

sighttpd.conf:

-----
Listen 3000

<Stdin>
	Path "/date.txt"
	Type "text/plain"
</Stdin>
-----

Then, run:

    $ while `true`; do date; sleep 1; done | sighttpd

Then connect from another terminal:

$ curl -i http://localhost:3000/date.txt
HTTP/1.1 200 OK
Date: Wed, 07 Apr 2010 04:23:09 GMT
Server: Sighttpd/0.9.0<commit_msg>admin-guide.txt: add description of path and text directives<commit_after>
Sighttpd Administrator's Guide
==============================

By default, the configuration file is looked for in /etc/sighttpd/sighttpd.conf
You can override this with the -f commandline option to sighttpd:

$ sighttpd -f /path/to/configfile


1. Syntax
---------

Comments are marked with a '#' character, and continue to the end of line.

Configuration directives are single keywords followed by whitespace and a
value (to the end of the line, or comment character). The directive name
(ie. keyword) is case insensitive.

Configuration is grouped in blocks; the names of directives are scoped within
a configuration block. Any configuration directives outside of a block are
global to the entire configuration. Block names are case insensitive.

For example, the configuration file:

-----
Listen 3000

<StaticText>
	Path "/welcome.txt"
	Text "Hello, world!"
</StaticText>
-----

specifies one global directive ("Listen 3000"), and one block ("StaticText").
Within that block, the directives "Path" and "Text" appear.


2. Stdin: Configuring streaming from standard input
---------------------------------------------------

This section explains how to configure streaming of data from stdin with
three examples:

	1. plain text
	2. H.264 video
	3. Motion JPEG

The <stdin> configuration block takes two parameters, Path and Type.

Path specifies the local part of the URL path at which you would like the content
to appear.  For example, when configuring the server http://example.com/, the
configuration directive:

	Path /my/video.ogv

in a <stdin> block will make the content appear at http://example.com/my/video.ogv

The Type parameter specifies the Internet media type of the stream, which will
appear in the Content-Type HTTP response header. For example, the configuration:

	Type video/ogg

will instruct sighttpd to serve this stream with Content-Type: video/ogg.


2.1. Streaming text updates

This configuration prints a timestamp every second. The content appears at
the path /date.txt (eg. http://localhost/date.txt):

sighttpd.conf:

-----
Listen 3000

<Stdin>
	Path "/date.txt"
	Type "text/plain"
</Stdin>
-----

Then, run:

    $ while `true`; do date; sleep 1; done | sighttpd

Then connect from another terminal:

$ curl -i http://localhost:3000/date.txt
HTTP/1.1 200 OK
Date: Wed, 07 Apr 2010 04:23:09 GMT
Server: Sighttpd/0.9.0
{'fraction_non_alphanumeric': 0.1224976167778837, 'fraction_numerical': 0.022402287893231648, 'mean_word_length': 3.479188900747065, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4397216', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1138, 'n_words': 545}