- s6-envuidgid
puts the uid and gid of user www into the environment.
diff --git a/doc/tipidee.conf.html b/doc/tipidee.conf.html
new file mode 100644
index 0000000..42c1afc
--- /dev/null
+++ b/doc/tipidee.conf.html
@@ -0,0 +1,605 @@
+
+
+
+
+
+ tipidee: the /etc/tipidee.conf configuration file
+
+
+
+
+
+
+
+tipidee
+Software
+skarnet.org
+
+
+ The /etc/tipidee.conf configuration file
+
+ Goal and usage
+
+
+ /etc/tipidee.conf is a text file written by the web administrator
+to configure the tipideed server. After writing
+or modifying this file, the administrator is expected to run the
+tipidee-config program, that will read
+/etc/tipidee.conf and output a /etc/tipidee.conf.cdb file
+that will be suitable for tipideed to use.
+
+
+
+ tipidee-config provides sane defaults,
+so an empty /etc/tipidee.conf file is perfectly usable
+for purely static installations. But an empty file still needs to be
+created, unless tipidee-config is run
+with the -i /dev/null option.
+
+
+ Description
+
+
+ The /etc/tipidee.conf file contains a series of lines; every line is an
+instruction. Lines do not wrap around and there is no quoting, so a newline is
+always the end of an instruction. Empty lines, or lines containing only
+whitespace, or lines beginning with # (comments), are ignored.
+If a line contains a # that is not in the middle or end of a word, the
+rest of the line is also considered a comment, and ignored.
+
+
+
+ Words on a line are separated by whitespace (spaces or tabs).
+Instructions are one directive, the first word in the line, followed by
+one or more arguments. Most directives take a fixed number of
+arguments; some of them take a variable number. There are several types
+of directives.
+
+
+
+
Preprocessing directives
+
+
+
+ These are meta-directives: they do not control tipideed's
+behaviour directly, but tell tipidee-config to
+include other files. They allow administrators and packagers to write modular, pluggable
+configuration files. Preprocessing directives always start with a !
+(exclamation point, or bang) character.
+
+
+
+ You will probably never see preprocessing directives in simple configuration files.
+They are meant for bigger or more generic configurations.
+
+
+
+
The !include directive
+
+
+
+ !include file
+
+
+
+ - This directive will replace itself with the contents of file.
+ - file can be a relative or absolute path. If relative, then
+it is relative to the directory of the file being currently processed, i.e.
+the file containing the !include directive. In other words, things
+will work as you intuitively expect.
+
+
+
+
The !includedir directive
+
+
+
+ !includedir dir
+
+
+
+ - This directive will include every file in directory dir.
+ - File names starting with a . (dot) will be ignored (i.e. not included).
+ - The inclusion order is deterministic: file names are sorted according to the C locale.
+ - dir can be a relative or absolute path. If relative, then
+it is relative to the directory of the file being currently processed, i.e.
+the file containing the !includedir directive. In other words, things
+will work as you intuitively expect.
+
+
+
+
The !included: directive
+
+
+
+ !included: unique
+ !included: multiple
+
+
+
+ - This directive is usually written at the beginning of a file. Only one
+such directive per file is allowed.
+ - !included: governs what happens when a file is included
+more than once.
+
+ - If a file contains an !included: unique line, then all
+inclusions of this file after the first one will be ignored: the contents
+of the file will appear only once.
+ - If a file contains an !included: multiple line, then the
+file will be expanded into its contents every time the file is
+included.
+ - If a file does not contain an !included: directive, then
+including it twice is an error, and
+tipidee-config-preprocess,
+the program in charge of the preprocessing directives, will complain and
+exit.
+
+ - Don't forget the : (colon) at the end of the !included:
+directive!
+
+
+
+
Global directives
+
+
+
+ Global directives control global aspects of tipideed
+— values that apply to the server itself, no matter what domain it is
+serving. The directive name is global, and it takes two arguments: the
+name and the value of a setting.
+
+
+
+
verbosity
+
+
+
+ global verbosity v
+
+
+
+ - v is a non-negative integer, describing the level of verbosity that
+tipideed will write to its stderr with.
+ - 0 means only error messages will be printed.
+ - 1 is the default; it means error messages and warnings will be printed.
+ - 2 is more verbose, also printing a summary of every HTTP request.
+ - 3 is like 2 but also prints personally identifiable client information,
+such as its IP address.
+ - 4 prints a lot of details for every request.
+ - 5 or more is debugging output.
+ - The configuration file setting can be overwritten by a -v
+option on the tipideed command line.
+
+
+
+
read_timeout
+
+
+
+ global read_timeout t
+
+
+
+ - t is a non-negative integer, in milliseconds. It represents
+the maximum duration that a client is allowed to be idle.
+ - If t milliseconds elapse without the client sending a request,
+tipideed will assume it is done, close the
+connection and exit. Also, if t milliseconds elapse while the client
+is sending a request, and the request is still not complete,
+tipideed will also close the connection.
+ - The default is 0, meaning infinite: tipideed
+will never slam the door into a client's face, even if the client is
+excessively slow or fails to close a connection it's not using anymore.
+ - A good setting is global read_timeout 60000, closing connections
+after one minute of inactivity.
+
+
+
+
write_timeout
+
+
+
+ global write_timeout t
+
+
+
+ - t is a non-negative integer, in milliseconds. It represents
+the maximum duration that tipideed will accept
+to wait when sending data to the client.
+ - If t milliseconds elapse while tipideed
+is sending data to the client, tipideed will
+give up and exit with an error message.
+ - This typically happens when the network is congested, and the kernel's
+socket send buffers are full. It could also mean that a client is failing to
+read the data it has requested; or that the data is very large and
+taking time to transfer.
+ - The default is 0, meaning infinite: tipideed
+will wait forever until the network uncongests and its client starts to behave.
+ - An example setting is global write_timeout 600000, closing connections
+if a transfer takes more than 10 minutes; but servers serving large files to
+clients on slow connections will want a larger value.
+
+
+
+
cgi_timeout
+
+
+
+ global cgi_timeout t
+
+
+
+ - t is a non-negative integer, in milliseconds. It represents
+the maximum duration that a CGI script spawned by
+tipideed is allowed to run.
+ - If t milliseconds elapse while a CGI script is running, and
+tipideed hasn't gotten a full response yet,
+the script will be killed, and tipideed will
+send a 504 (Gateway Timeout) response to the client.
+ - The default is 0, meaning infinite: tipideed
+will wait forever until the network uncongests and its client starts to behave.
+ - An example setting is global write_timeout 10000, giving any
+CGI scripts 10 seconds to complete — most users aren't willing to wait
+more than a few seconds for a page to render anyway.
+
+
+
+
max_request_body_length
+
+
+
+ global max_request_body_length n
+
+
+
+ - n is a non-negative integer, in bytes. It represents the
+maximum size that tipideed will accept for
+the body of an HTTP request.
+ - If the client sends a request with a body larger than n bytes,
+tipideed will send a 413 (Content Too Large)
+response and close the connection.
+ - The default is 8192, which is large enough for most.
+ - An example setting is global max_request_body_length 500,
+when the administrator knows that no script on the site needs an input of
+more than 500 bytes and anything larger is malicious.
+
+
+
+
max_cgi_body_length
+
+
+
+ global max_cgi_body_length n
+
+
+
+ - n is a non-negative integer, in bytes. It represents the
+maximum size that tipideed will accept for
+a CGI script's answer that it needs to process.
+ - If a CGI script writes more than n bytes to its stdout,
+tipideed will send a 502 (Bad Gateway)
+response to the client and die with an error message.
+ - This limit does not apply to NPH scripts, which send their stdout
+directly to the client without any processing by tipideed.
+ - The default is 4194304 (4 mebibytes).
+ - An example setting is global max_cgi_body_length 100000000,
+when the administrator knows that CGI scripts can write up to 100 megabytes.
+Note that the CGI specification forces web servers to read the whole CGI
+output in memory, so the larger the value, the more RAM
+tipideed may consume in order to hold CGI
+output data. And this is "private dirty" memory, i.e. memory that
+really counts towards resource use on your server, so be careful with
+that setting — and with the CGI scripts you choose to run.
+
+
+
+
index_file
+
+
+
+ global index_file file1 file2 ...
+
+
+
+ - The global index_file directive has a variable number of
+arguments. file1, file2, and so on are the names of the
+files that should be used to try and complete the URI when a client request
+resolves to a directory.
+ - For instance: global index_file index.cgi index.html index.htm
+means that when tipideed is asked to serve
+http://example.com, it will first try to serve as if the request
+had been http://example.com/index.cgi, then
+http://example.com/index.html, then http://example.com/index.htm.
+The first resource found is the one that is served; if none of the
+resources exist, tipideed responds 404 (Not Found).
+ - This is valid for any subdirectory: http://example.com/foo, if the
+/foo resource resolves to a directory, is expanded to
+http://example.com/foo/index.cgi, then (if not found)
+http://example.com/foo/index.html, then (if not found)
+http://example.com/foo/index.htm.
+ - The default is global index_file index.html, meaning that
+only the index.html file will be looked up when a resource resolves
+to a directory.
+
+
+
+
The content-type directive
+
+
+
+ content-type is also a global directive, but is introduced by the
+keyword content-type, without prepending global. It allows
+the user to define mappings from a document's extension to a standard Content-Type.
+
+
+
+ content-type type extension1 extension2 ...
+
+
+
+ - Files ending with extension1, extension2, and so on, will be served
+to clients with the Content-Type: type header.
+
- Extensions must be listed with their initial dot.
+ - Example: content-type text/html .html .htm means that files
+ending in .html or .htm should be served as text/html.
+
- tipidee already comes with a
+large
+list of default Content-Type mappings; this directive should only be necessary if you're
+serving files with uncommon extensions or have specific needs.
+
+
+
+
Local directives
+
+
+
+ All the other directives are local: they only apply to the current domain.
+Except for domain, they can only be used after a domain directive.
+
+
+
+
domain
+
+
+
+ domain domain
+
+
+
+ domain is a special directive in that it is stateful. Instead of
+having a direct effect on the configuration, it merely defines the domain that
+the next local directives will apply to. domain example.com means
+that a subsequent cgi /cgi-bin/ line will declare that a resource
+under //example.com/cgi-bin/ is a CGI script.