#
# lighttpd.conf by SDK, 2009
#
###
### load server modules
###
server.modules = (
# "mod_access",
"mod_alias",
"mod_accesslog",
"mod_compress",
"mod_dirlisting",
# "mod_rewrite",
# "mod_fastcgi",
"mod_auth",
"mod_redirect",
"mod_evhost",
"mod_status",
# "mod_usertrack",
"mod_rrdtool",
# "mod_webdav",
# "mod_expire",
# "mod_flv_streaming",
# "mod_evasive",
# "mod_ssi",
# "mod_magnet",
"mod_cgi"
)
###
### DOCUMENT ROOT
###
server.document-root = "/docroot/http/default"
###
### PHP FASTCGI + CONFIGURATION
###
# fastcgi.server = ( ".php" =>
# (
# (
# "bin-path" => "/usr/bin/php5-cgi",
# "socket" => "/tmp/php.socket",
# "max-procs" => 6,
# "idle-timeout" => 20,
# "bin-environment" => (
# "PHP_FCGI_CHILDREN" => "8",
# "PHP_FCGI_MAX_REQUESTS" => "10000"
# ),
# "bin-copy-environment" => (
# "PATH", "SHELL", "USER"
# ),
# "broken-scriptfilename" => "enable"
# )
# )
# )
###
### Vhost mrtg.xxzz.de
###
$HTTP["host"] == "mrtg.xxzz.de" {
alias.url += ( "/cgi-bin/" => "/usr/lib/cgi-bin/" )
cgi.assign = (".cgi" => "/usr/bin/perl")
auth.debug = 0
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/lighttpd/htusers"
auth.require = ( "/" =>
(
"method" => "basic",
"realm" => "protected",
"require" => "user=nerd",
)
)
}
###
### Vhost www.xxzz.de
###
$HTTP["host"] == "www.xxzz.de" {
$HTTP["url"]=~"^/files" {
server.dir-listing = "enable"
}
}
###
### Vhost img.xxzz.de
###
$HTTP["host"] == "img.xxzz.de" {
server.dir-listing = "enable"
auth.debug = 0
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/lighttpd/htusers"
auth.require = ( "/" =>
(
"method" => "basic",
"realm" => "protected",
"require" => "user=nerd",
)
)
}
###
### Vhost tmp.xxzz.de
###
$HTTP["host"] == "tmp.xxzz.de" {
server.dir-listing = "enable"
auth.debug = 0
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/lighttpd/htusers"
auth.require = ( "/" =>
(
"method" => "basic",
"realm" => "protected",
"require" => "user=nerd",
)
)
}
###
### Vhost dot.xxzz.de
###
$HTTP["host"] == "dot.xxzz.de" {
server.dir-listing = "enable"
}
###
### Vhost sh.xxzz.de
###
$HTTP["host"] == "sh.xxzz.de" {
server.dir-listing = "enable"
}
###
### Vhost scr.xxzz.de
###
$HTTP["host"] == "scr.xxzz.de" {
server.dir-listing = "enable"
}
###
### Vhost gpg.xxzz.de
###
$HTTP["host"] == "gpg.xxzz.de" {
url.redirect = (".*" => "http://www.xxzz.de/key.txt")
}
###
### Vhost list.xxzz.de Mailman Lists
###
$HTTP["host"] == "list.xxzz.de" {
server.dir-listing = "enable"
alias.url += (
"/mailman/" => "/usr/lib/cgi-bin/mailman/",
"/cgi-bin/" => "/usr/lib/cgi-bin/",
"/pipermail/" => "/var/lib/mailman/archives/public/",
"/images/mailman/" => "/usr/share/images/mailman/")
cgi.assign = (
".pl" => "/usr/bin/perl",
"/admin" => "",
"/admindb" => "",
"/confirm" => "",
"/create" => "",
"/edithtml" => "",
"/listinfo" => "",
"/options" => "",
"/private" => "",
"/rmlist" => "",
"/roster" => "",
"/subscribe" => "",)
url.rewrite = ( "^/$" => "/pipermail",
"^/Mailman/$" => "/Mailman/listinfo" )
}
###
### Logfiles
###
server.errorlog = "/var/log/lighttpd/error.log"
accesslog.filename = "/var/log/lighttpd/access.log"
###
### Index files
###
index-file.names = ( "index.html", "index.htm" )
###
### Use the "Content-Type" extended attribute to obtain mime type if possible
###
mimetype.use-xattr = "enable"
###
### deny access the file-extensions
###
url.access-deny = ( "~", ".inc" )
###
### which extensions should not be handle via static-file transfer
###
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".cgi" )
###
### Webserver Port
###
server.port = 80
###
### error-handler for status 404
###
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
#server.errorfile-prefix = "/var/www/"
###
### Pidfile location
###
server.pid-file = "/var/run/lighttpd.pid"
###
### global virtual directory listings
###
dir-listing.encoding = "utf-8"
server.dir-listing = "disable"
###
### Set chroot
###
#server.chroot = "/docroot/"
###
### Server User/Group
###
server.username = "www-data"
server.groupname = "www-data"
###
### mod_compress
###
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ("text/plain", "text/html", "application/x-javascript", "text/css")
###
### mod_status
###
$HTTP["host"] == "mrtg.xxzz.de" {
status.status-url = "/lightstatus"
status.config-url = "/lightconfig"
}
###
### mod_dirlisting
###
dir-listing.hide-dotfiles = "disable"
dir-listing.exclude = "robots.txt"
dir-listing.show-readme = "enable"
dir-listing.hide-readme-file = "enable"
dir-listing.hide-header-file = "enable"
dir-listing.show-header = "enable"
dir-listing.set-footer = "
HTH
Your friendly Webserver"
dir-listing.external-css = "http://www.xxzz.de/styles/dirlist.css"
###
### Configure local storage pattern
###
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
evhost.path-pattern = "/docroot/http/%3.%2/"
###
### mod_expire
###
# expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
###
### mod_rrd
###
rrdtool.binary = "/usr/bin/rrdtool"
rrdtool.db-name = "/docroot/http/mrtg.xxzz/lighttpd.rrd"
###
### preformance
###
server.event-handler = "linux-sysepoll"
server.network-backend = "linux-sendfile"
server.stat-cache-engine = "fam"
###
### mimetype mapping
###
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
###
### load enabled configuration files,
###
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"