The sighttpd.conf file is the runtime configuration file for sighttpd. 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
Various example config files are distributed in the examples/ directory of the sighttpd source distribution.
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.
Parameters outside of a <block> are global.
The StaticText module allows you to specify that a text string should appear at a given URL. This is useful for identifying server instances at your installation.
The Stdin module allows streaming of data from stdin.
in a <stdin> block will make the content appear at http://example.com/my/video.ogv
will instruct sighttpd to serve this stream with Content-Type: video/mpeg4.
Raw Ogg data cannot be streamed from standard input using <Stdin>, as an Ogg stream needs to have setup headers prepended for each codec stream. For this purpose a special module called <OggStdin> is provided, which buffers these headers and serves them first to each client that connects before continuing with live Ogg pages.
in a <oggstdin> block will make the content appear at http://example.com/my/stream.ogg
will instruct sighttpd to serve this stream with Content-Type: audio/ogg.
sighttpd includes direct support for integrated capture, video encoding and streaming on Renesas SH-Mobile processors. This module supports the following configuration directives:
in an <SHRecord> block will make the content appear at http://example.com/my/video.264
Listen 3000 <Stdin> Path "/date.txt" Type "text/plain" </Stdin>
$ 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
Wed Apr 7 13:23:09 JST 2010
Wed Apr 7 13:23:10 JST 2010
Wed Apr 7 13:23:11 JST 2010
Listen 3000 <Stdin> Path "/stream.264" Type "video/mp4" </Stdin>
Then run your streaming video input, eg:
$ shcodecs-record k264-v4l2-stream.ctl | sighttpd
and connect with a video player:
$ mplayer http://localhost:3000/stream.264 -fps 30
Listen 3000 <Stdin> Path "/mjpeg/" Type "multipart/x-mixed-replace; boundary=++++++++" </Stdin>
This configuration expects that a series of jpeg comes in from stdin. At each boundary the following headers must be inserted:
Content-length: <size of jpeg file>
examples/mjpeg_test.sh is provided for testing purpose. Execute the following:
$ examples/mjpeg_test.sh file1 file2 file3 ...
Then open 'http://localhost:3000/mjpeg/' with a web browser that supports Motion JPEG, such as firefox(1).
Listen 3000 # Streaming Ogg Vorbis from stdin, using the special # OggStdin module that caches Ogg Vorbis headers <OggStdin> Path "/stream.ogg" Type "audio/ogg" </OggStdin>
You can run this with a shell pipeline like:
$ arecord -c 2 -r 44100 -f S16_LE -t wav | oggenc -o - - | sighttpd -f examples/sighttpd-oggstdin.conf
And you can connect to it as an Ogg stream, eg:
$ ogg123 http://localhost:3000/stream.ogg
Listen 3000 <SHRecord> Path "/video0/vga.264" CtlFile "/usr/share/shcodecs-record/k264-v4l2-vga-stream.ctl" </SHRecord> <SHRecord> Path "/video0/cif.264" CtlFile "/usr/share/shcodecs-record/k264-v4l2-cif-stream.ctl" </SHRecord>
will make two H.264 streams appear at:
/etc/sighttpd/sighttpd.conf or sighttpd.conf
Please report bugs to the author, firstname.lastname@example.org
This man page is current for version 1.0.0 of sighttpd.
sighttpd is distributed under the GNU General Public License. See the file COPYING for details.
A web site is available at http://www.kfish.org/software/sighttpd/
We would be delighted to hear from you if you like this program.
sighttpd was written by Conrad Parker.