summaryrefslogtreecommitdiff
path: root/doc/configuration.txt
diff options
context:
space:
mode:
authorArno Töll <arno@debian.org>2012-11-21 23:03:45 +0100
committerArno Töll <arno@debian.org>2012-11-21 23:03:45 +0100
commit9fa7c3d770fb8688555b661940e04c3bf6b6d8aa (patch)
tree7d26c5c3a492656762910721988ee0867f7a57c4 /doc/configuration.txt
parentc99b717062c6228c4ac6df3831702f81c9806df4 (diff)
downloadlighttpd-upstream/1.4.13_r1385.tar.gz
Imported Upstream version 1.4.13~r1385upstream/1.4.13_r1385
Diffstat (limited to 'doc/configuration.txt')
-rw-r--r--doc/configuration.txt160
1 files changed, 80 insertions, 80 deletions
diff --git a/doc/configuration.txt b/doc/configuration.txt
index 2b60e58..416329b 100644
--- a/doc/configuration.txt
+++ b/doc/configuration.txt
@@ -7,15 +7,15 @@ Module: core
------------
:Author: Jan Kneschke
-:Date: $Date: 2006-03-09 01:10:40 +0100 (Thu, 09 Mar 2006) $
-:Revision: $Revision: 1034 $
+:Date: $Date: 2006-10-04 15:26:23 +0200 (Wed, 04 Oct 2006) $
+:Revision: $Revision: 1371 $
:abstract:
the layout of the configuration file
-
+
.. meta::
:keywords: lighttpd, configuration
-
+
.. contents:: Table of Contents
Description
@@ -36,21 +36,21 @@ A BNF like notation: ::
<array> : "(" [ <string> "=>" ] <value> [, [ <string> "=>" ] <value> ]* ")"
INCLUDE : "include" VALUE
INCLUDE_SHELL : "include_shell" STRING_VALUE
-
+
Example
-------
::
-
+
# default document-root
server.document-root = "/var/www/example.org/pages/"
-
+
# TCP port
server.port = 80
-
+
# selecting modules
server.modules = ( "mod_access", "mod_rewrite" )
-
+
# variables, computed when config is read.
var.mymodule = "foo"
server.modules += ( "mod_" + var.mymodule )
@@ -125,22 +125,22 @@ Example
$HTTP["url"] =~ "^/download/" {
dir-listing.activate = "disable"
}
-
+
# handish virtual hosting
# map all domains of a top-level-domain to a single document-root
$HTTP["host"] =~ "(^|\.)example\.org$" {
server.document-root = "/var/www/htdocs/example.org/pages/"
}
-
+
# multiple sockets
$SERVER["socket"] == "127.0.0.1:81" {
server.document-root = "..."
}
-
+
$SERVER["socket"] == "127.0.0.1:443" {
ssl.pemfile = "/var/www/certs/localhost.pem"
ssl.engine = "enable"
-
+
server.document-root = "/var/www/htdocs/secure.example.org/pages/"
}
@@ -148,19 +148,19 @@ Example
$HTTP["useragent"] =~ "Google" {
url.access-deny = ( "" )
}
-
+
# deny access for all image stealers
$HTTP["referer"] !~ "^($|http://www\.example\.org)" {
url.access-deny = ( ".jpg", ".jpeg", ".png" )
}
- # deny the access to www.example.org to all user which
+ # deny the access to www.example.org to all user which
# are not in the 10.0.0.0/8 network
$HTTP["host"] == "www.example.org" {
$HTTP["remoteip"] != "10.0.0.0/8" {
url.access-deny = ( "" )
}
- }
+ }
Using variables
===============
@@ -177,7 +177,7 @@ You can set your own variables in the configuration to simplify your config.
in incl-base.conf:
server.document-root = basedir + server.name + "/pages/"
accesslog.filename = basedir + server.name + "/logs/access.log"
-
+
You can also use environement variables or the default variables var.PID and
var.CWD: ::
@@ -248,11 +248,11 @@ server.document-root
might have specified with one of the above conditionals.
Default: no default, required
-
+
server.bind
IP address, hostname or absolute path to the unix-domain socket the server
listen on.
-
+
Default: bind to all interfaces
Example: ::
@@ -260,14 +260,14 @@ server.bind
server.bind = "127.0.0.1"
server.bind = "www.example.org"
server.bind = "/tmp/lighttpd.socket"
-
+
server.port
tcp-port to bind the server to
-
+
.. note:: port belows 1024 require root-permissions
-
+
Default: 80 (443 if ssl is enabled)
-
+
server.use-ipv6
bind to the IPv6 socket
@@ -275,42 +275,42 @@ server.tag
set the string returned by the Server: response header
Default: lighttpd <current-version>
-
+
server.errorlog
pathname of the error-log
-
+
Default: either STDERR or ``server.errorlog-use-syslog``
-
+
server.errorlog-use-syslog
send errorlog to syslog
-
+
Default: disabled
-
+
server.chroot
root-directory of the server
-
+
NOTE: requires root-permissions
-
+
server.username
username used to run the server
-
+
NOTE: requires root-permissions
server.groupname
groupname used to run the server
-
+
NOTE: requires root-permissions
server.follow-symlink
allow to follow-symlinks
-
+
Default: enabled
index-file.names
list of files to search for if a directory is requested
e.g.: ::
- index-file.names = ( "index.php", "index.html",
+ index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
if a name starts with slash this file will be used a index generator
@@ -318,17 +318,17 @@ index-file.names
server.modules
modules to load
-
+
.. note:: the order of the modules is important.
The modules are executed in the order as they are specified. Loading
mod_auth AFTER mod_fastcgi might disable authentication for fastcgi
- backends (if check-local is disabled).
+ backends (if check-local is disabled).
- As auth should be done first, move it before all executing modules (like
+ As auth should be done first, move it before all executing modules (like
proxy, fastcgi, scgi and cgi).
- rewrites, redirects and access should be first, followed by auth and
+ rewrites, redirects and access should be first, followed by auth and
the docroot plugins.
Afterwards the external handlers like fastcgi, cgi, scgi and proxy and
@@ -336,12 +336,12 @@ server.modules
e.g.: ::
- server.modules = ( "mod_rewrite",
- "mod_redirect",
+ server.modules = ( "mod_rewrite",
+ "mod_redirect",
"mod_alias",
- "mod_access",
- "mod_auth",
- "mod_status",
+ "mod_access",
+ "mod_auth",
+ "mod_status",
"mod_simple_vhost",
"mod_evhost",
"mod_userdir",
@@ -363,74 +363,74 @@ server.modules
- mod_staticfile
server.event-handler
- set the event handler
-
+ set the event handler
+
Default: "poll"
server.pid-file
- set the name of the .pid-file where the PID of the server should be placed.
+ set the name of the .pid-file where the PID of the server should be placed.
This option is used in combination with a start-script and the daemon mode
-
+
Default: not set
-
+
server.max-request-size
maximum size in kbytes of the request (header + body). Only applies to POST
requests.
-
+
Default: 2097152 (2GB)
server.max-worker
number of worker processes to spawn. This is usually only needed on servers
which are fairly loaded and the network handler calls delay often (e.g. new
requests are not handled instantaneously).
-
+
Default: 0
-
+
server.name
name of the server/virtual server
-
+
Default: hostname
server.max-keep-alive-requests
- maximum number of request within a keep-alive session before the server
+ maximum number of request within a keep-alive session before the server
terminates the connection
-
+
Default: 128
server.max-keep-alive-idle
maximum number of seconds until a idling keep-alive connection is droped
-
+
Default: 30
server.max-read-idle
- maximum number of seconds until a waiting, non keep-alive read times out
+ maximum number of seconds until a waiting, non keep-alive read times out
and closes the connection
-
+
Default: 60
server.max-write-idle
maximum number of seconds until a waiting write call times out and closes
the connection
-
+
Default: 360
server.error-handler-404
uri to call if the requested file results in a 404
Default: not set
-
+
Example: ::
-
+
server.error-handler-404 = "/error-404.php"
server.protocol-http11
defines if HTTP/1.1 is allowed or not.
-
+
Default: enabled
server.range-requests
defines if range requests are allowed or not.
-
+
Default: enabled
@@ -445,9 +445,9 @@ debugging
debug.dump-unknown-headers
enables listing of internally unhandled HTTP-headers
-
+
e.g. ::
-
+
debug.dump-unknown-headers = "enable"
mimetypes
@@ -456,20 +456,20 @@ mimetypes
mimetype.assign
list of known mimetype mappings
NOTE: if no mapping is given "application/octet-stream" is used
-
+
e.g.: ::
-
- mimetype.assign = ( ".png" => "image/png",
+
+ mimetype.assign = ( ".png" => "image/png",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".html" => "text/html",
".txt" => "text/plain" )
- The list is compared top down and the first match is taken. This is
+ The list is compared top down and the first match is taken. This is
important if you have matches like: ::
".tar.gz" => "application/x-tgz",
- ".gz" => "application/x-gzip",
+ ".gz" => "application/x-gzip",
If you want to set another default mimetype use: ::
@@ -483,17 +483,17 @@ mimetype.use-xattr
retrieve the "Content-Type" attribute on each file, and use that as the
mime type. If it's not defined or not available, fall back to the
mimetype.assign assignment.
-
+
e.g.: ::
-
+
mimetype.use-xattr = "enable"
-
+
on shell use:
-
+
$ attr -s Content-Type -V image/svg svgfile.svg
-
+
or
-
+
$ attr -s Content-Type -V text/html indexfile
@@ -501,13 +501,13 @@ debugging
`````````
debug.log-request-header
- default: disabled
-
+ default: disabled
+
debug.log-response-header
- default: disabled
+ default: disabled
debug.log-file-not-found
- default: disabled
+ default: disabled
debug.log-request-handling
- default: disabled
+ default: disabled