Browse Source

- replace old default config with my config from opensuse. #2203

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2738 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.27
Marcus Rückert 12 years ago
parent
commit
433c2a0c0d
  1. 27
      doc/config/conf.d/access_log.conf
  2. 27
      doc/config/conf.d/auth.conf
  3. 33
      doc/config/conf.d/cgi.conf
  4. 27
      doc/config/conf.d/cml.conf
  5. 31
      doc/config/conf.d/compress.conf
  6. 47
      doc/config/conf.d/debug.conf
  7. 55
      doc/config/conf.d/dirlisting.conf
  8. 22
      doc/config/conf.d/evhost.conf
  9. 22
      doc/config/conf.d/expire.conf
  10. 135
      doc/config/conf.d/fastcgi.conf
  11. 26
      doc/config/conf.d/geoip.conf
  12. 22
      doc/config/conf.d/magnet.conf
  13. 77
      doc/config/conf.d/mime.conf
  14. 16
      doc/config/conf.d/mod.template
  15. 47
      doc/config/conf.d/mysql_vhost.conf
  16. 35
      doc/config/conf.d/proxy.conf
  17. 21
      doc/config/conf.d/rrdtool.conf
  18. 51
      doc/config/conf.d/scgi.conf
  19. 35
      doc/config/conf.d/secdownload.conf
  20. 28
      doc/config/conf.d/simple_vhost.conf
  21. 16
      doc/config/conf.d/ssi.conf
  22. 24
      doc/config/conf.d/status.conf
  23. 70
      doc/config/conf.d/trigger_b4_dl.conf
  24. 37
      doc/config/conf.d/userdir.conf
  25. 33
      doc/config/conf.d/webdav.conf
  26. 426
      doc/config/lighttpd.conf
  27. 172
      doc/config/modules.conf
  28. 33
      doc/config/vhosts.d/vhosts.template
  29. 322
      doc/lighttpd.conf

27
doc/config/conf.d/access_log.conf

@ -0,0 +1,27 @@
#######################################################################
##
## Corresponding documentation:
##
## http://www.lighttpd.net/documentation/access.html
##
server.modules += ( "mod_accesslog" )
##
## Default access log.
##
accesslog.filename = log_root + "/access.log"
##
## The default format produces CLF compatible output.
## For available parameters see access.txt
##
#accesslog.format = "%h %l %u %t \"%r\" %b %>s \"%{User-Agent}i\" \"%{Referer}i\""
##
## If you want to log to syslog you have to unset the
## accesslog.use-syslog setting and uncomment the next line.
##
#accesslog.use-syslog = "enable"
#
#######################################################################

27
doc/config/conf.d/auth.conf

@ -0,0 +1,27 @@
#######################################################################
##
## Authentication Module
## -----------------------
##
## See http://www.lighttpd.net/documentation/authentification.html
## for more info.
##
#auth.backend = "plain"
#auth.backend.plain.userfile = "/etc/lighttpd/lighttpd.user"
#auth.backend.plain.groupfile = "/etc/lighttpd/lighttpd.group"
#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"
#auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "Server Status",
# "require" => "valid-user"
# ),
# )
##
#######################################################################

33
doc/config/conf.d/cgi.conf

@ -0,0 +1,33 @@
#######################################################################
##
## CGI modules
## ---------------
##
## http://www.lighttpd.net/documentation/cgi.html
##
server.modules += ( "mod_cgi" )
##
## Plain old CGI handling
##
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
cgi.assign = ( ".pl" => "/usr/bin/perl",
".cgi" => "/usr/bin/perl",
".rb" => "/usr/bin/ruby",
".erb" => "/usr/bin/eruby",
".py" => "/usr/bin/python" )
##
## to get the old cgi-bin behavior of apache
##
## Note: make sure that mod_alias is loaded if you uncomment the
## next line. (see modules.conf)
##
#alias.url += ( "/cgi-bin" => server_root + "/cgi-bin" )
#$HTTP["url"] =~ "^/cgi-bin" {
# cgi.assign = ( "" => "" )
#}
##
#######################################################################

27
doc/config/conf.d/cml.conf

@ -0,0 +1,27 @@
#######################################################################
##
## CML Module
## ---------------
##
## see http://www.lighttpd.net/documentation/cml.html
##
server.modules += ( "mod_cml" )
index-file.names += ( "index.cml" )
##
## The file extension that is bound to the cml-module.
##
cml.extension = ".cml"
##
## Memcached hosts used for memcache* functions.
##
#cml.memcache-hosts = ( "127.0.0.1:11211" )
##
## A cml file that is executed for each request.
##
#cml.power-magnet = server_root + "/htdocs/powermagnet.cml"
##
#######################################################################

31
doc/config/conf.d/compress.conf

@ -0,0 +1,31 @@
#######################################################################
##
## Output Compression
## --------------------
##
## see http://www.lighttpd.net/documentation/compress.html
##
server.modules += ( "mod_compress" )
##
## where should the compressed files be cached?
## see the base config for the declaration of the variable.
##
## This directory should be changed per vhost otherwise you can
## run into trouble with overlapping filenames
##
compress.cache-dir = cache_dir + "/compress"
##
## FileTypes to compress.
##
compress.filetype = ("text/plain", "text/html")
##
## Maximum filesize that will be compressed.
## Default is 0, which means unlimited file size.
##
#compress.max-filesize = 0
##
#######################################################################

47
doc/config/conf.d/debug.conf

@ -0,0 +1,47 @@
#######################################################################
##
## Debug options
## ---------------
##
## Enable those options for debugging the behavior
##
## The settings can be set per location/vhost.
##
##
## log-request-handling allows you to track the request
## handing inside lighttpd.
##
#debug.log-request-handling = "enable"
##
## log all request headers.
##
#debug.log-request-header = "enable"
##
## similar to log-request-header.
## but only logs if we encountered an error.
## (return codes 400 and 5xx)
##
#debug.log-request-header-on-error = "enable"
##
## log the header we send out to the client.
##
#debug.log-response-header = "enable"
##
## log if a file wasnt found in the error log.
##
#debug.log-file-not-found = "enable"
##
## debug conditionals handling
##
#debug.log-condition-handling = "enable"
#
#######################################################################

55
doc/config/conf.d/dirlisting.conf

@ -0,0 +1,55 @@
#######################################################################
##
## Dirlisting Module
## -------------------
##
## See http://www.lighttpd.net/documentation/dirlisting.html
##
##
## Enabled Directory listing
##
dir-listing.activate = "disable"
##
## Hide dot files from the listing?
## By default they are listed.
##
dir-listing.hide-dotfiles = "disable"
##
## list of regular expressions. Files that match any of the specified
## regular expressions will be excluded from directory listings.
##
dir-listing.exclude = ( "~$" )
##
## set a encoding for the generated directory listing
##
## If you file-system is not using ASCII you have to set the encoding of
## the filenames as they are put into the HTML listing AS IS (with XML
## encoding)
##
dir-listing.encoding = "UTF-8"
##
## Specify the url to an optional CSS file.
##
#dir-listing.external-css = "/dirindex.css"
##
## Include HEADER.txt files above the directory listing.
## You can disable showing the HEADER.txt in the listing.
##
dir-listing.hide-header-file = "disable"
dir-listing.show-header = "disable"
##
## Include README.txt files above the directory listing.
## You can disable showing the README.txt in the listing.
##
dir-listing.hide-readme-file = "disable"
dir-listing.show-readme = "disable"
##
#######################################################################

22
doc/config/conf.d/evhost.conf

@ -0,0 +1,22 @@
#######################################################################
##
## Enhanced virtual hosting
## --------------------------
##
## See http://www.lighttpd.net/documentation/evhost.html
##
server.modules += ( "mod_evhost" )
##
## define a pattern for the host url finding
## %% => % sign
## %0 => domain name + tld
## %1 => tld
## %2 => domain name without tld
## %3 => subdomain 1 name
## %4 => subdomain 2 name
##
evhost.path-pattern = vhosts_dir + "/%3/htdocs/"
##
#######################################################################

22
doc/config/conf.d/expire.conf

@ -0,0 +1,22 @@
#######################################################################
##
## Expire Module
## ---------------
##
## See http://www.lighttpd.net/documentation/expire.html
##
server.modules += ( "mod_expire" )
##
## assignes a expiration to all files below the specified path. The
## specification of the time is made up of:
##
## <access|modification> <number> <years|months|days|hours|minutes|seconds>
##
#expire.url = (
# "/buggy/" => "access 2 hours",
# "/images/" => "access plus 1 seconds 2 minutes"
#)
##
#######################################################################

135
doc/config/conf.d/fastcgi.conf

@ -0,0 +1,135 @@
#######################################################################
##
## FastCGI Module
## ---------------
##
## http://www.lighttpd.net/documentation/fastcgi.html
##
server.modules += ( "mod_fastcgi" )
##
## PHP Example
## For PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini.
##
## The number of php processes you will get can be easily calculated:
##
## num-procs = max-procs * ( 1 + PHP_FCGI_CHILDREN )
##
## for the php-num-procs example it means you will get 17*5 = 85 php
## processes. you always should need this high number for your very
## busy sites. And if you have a lot of RAM. :)
##
#fastcgi.server = ( ".php" =>
# ( "php-local" =>
# (
# "socket" => socket_dir + "/php-fastcgi-1.socket",
# "bin-path" => server_root + "/cgi-bin/php5",
# "max-procs" => 1,
# "broken-scriptfilename" => "enable",
# )
# ),
# ( "php-tcp" =>
# (
# "host" => "127.0.0.1",
# "port" => 9999,
# "check-local" => "disable",
# "broken-scriptfilename" => "enable",
# )
# ),
#
# ( "php-num-procs" =>
# (
# "socket" => socket_dir + "/php-fastcgi-2.socket",
# "bin-path" => server_root + "/cgi-bin/php5",
# "bin-environment" => (
# "PHP_FCGI_CHILDREN" => "16",
# "PHP_FCGI_MAX_REQUESTS" => "10000",
# ),
# "max-procs" => 5,
# "broken-scriptfilename" => "enable",
# )
# ),
# )
##
## Ruby on Rails Example
##
## Normally you only run one Rails application on one vhost.
##
#$HTTP["host"] == "rails1.example.com" {
# server.document-root = server_root + "/rails/someapp/public"
# server.error-handler-404 = "/dispatch.fcgi"
# fastcgi.server = ( ".fcgi" =>
# ("someapp" =>
# ( "socket" => socket_dir + "/someapp-fcgi.socket",
# "bin-path" => server_root + "/rails/someapp/public/dispatch.fcgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
# "TMP" => home_dir + "/rails/someapp",
# ),
# )
# )
# )
#}
##
## Another example with multiple rails applications on one vhost.
##
## http://blog.lighttpd.net/articles/2005/11/23/lighttpd-1-4-8-and-multiple-rails-apps
##
#$HTTP["host"] == "rails2.example.com" {
# $HTTP["url"] =~ "^/someapp1" {
# server.document-root = server_root + "/rails/someapp1/public"
# server.error-handler-404 = "/dispatch.fcgi"
# fastcgi.server = ( ".fcgi" =>
# ("someapp1" =>
# ( "socket" => socket_dir + "/someapp1-fcgi.socket",
# "bin-path" => server_root + "/rails/someapp1/public/dispatch.fcgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
# "TMP" => home_dir + "/rails/someapp1",
# ),
# "strip-request-uri" => "/someapp1/"
# )
# )
# )
# }
#
# $HTTP["url"] =~ "^/someapp2" {
# server.document-root = server_root + "/rails/someapp2/public"
# server.error-handler-404 = "/dispatch.fcgi"
# fastcgi.server = ( ".fcgi" =>
# ("someapp2" =>
# ( "socket" => socket_dir + "/someapp2-fcgi.socket",
# "bin-path" => server_root + "/rails/someapp2/public/dispatch.fcgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
# "TMP" => home_dir + "/rails/someapp2",
# ),
# "strip-request-uri" => "/someapp2/"
# )
# )
# )
# }
#}
## chrooted webserver + external PHP
##
## $ spawn-fcgi -f /usr/bin/php-cgi -p 2000 -a 127.0.0.1 -C 8
##
## webserver chrooted to /srv/www/
## php running outside the chroot
#
#fastcgi.server = (
# ".php" => ((
# "host" => "127.0.0.1",
# "port" => "2000",
# "docroot" => "/srv/www/servers/www.example.org/htdocs/"
# )))
#
#server.chroot = "/srv/www"
#server.document-root = "/servers/wwww.example.org/htdocs/"
#
##
#######################################################################

26
doc/config/conf.d/geoip.conf

@ -0,0 +1,26 @@
#######################################################################
##
## GeoIP Module
## ---------------
##
## mod_geoip is a module for fast ip/location lookups. It uses MaxMind
## GeoIP / GeoCity databases. If the ip was found in the database the
## module sets the appropriate environments variables to the request,
## thus making other modules/fcgi be informed.
##
server.modules += ( "mod_geoip" )
##
## mod_geoip will determine the database type automatically so if you
## enter GeoCity databse path it will load GeoCity Env.
##
#geoip.db-filename = "/path/to/GeoCityLite.dat"
##
## If enabled, mod_geoip will load the database binary file to memory
## for very fast lookups. The only penalty is memory usage.
##
#geoip.memory-cache = "disable"
##
#######################################################################

22
doc/config/conf.d/magnet.conf

@ -0,0 +1,22 @@
#######################################################################
##
## Magnet Module
## ---------------
##
## see http://trac.lighttpd.net/trac/wiki/Docs%3AModMagnet
##
server.modules += ( "mod_magnet" )
##
##
##
#magnet.attract-raw-url-to = ( )
##
## as an example for that see the mod_magnet docs and
## http://pixel.global-banlist.de./
##
#magnet.attract-physical-path-to = ( conf_dir + "/cleanurl.lua" )
##
#######################################################################

77
doc/config/conf.d/mime.conf

@ -0,0 +1,77 @@
#######################################################################
##
## MimeType handling
## -------------------
##
## http://www.lighttpd.net/documentation/configuration.html#mimetypes
##
## Use the "Content-Type" extended attribute to obtain mime type if
## possible
##
mimetype.use-xattr = "disable"
##
## mimetype mapping
##
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".spec" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
".rpm" => "application/x-rpm",
# make the default mime type application/octet-stream.
"" => "application/octet-stream",
)
#
#######################################################################

16
doc/config/conf.d/mod.template

@ -0,0 +1,16 @@
#######################################################################
##
## Foo Module
## ---------------
##
## http://www.lighttpd.net/documentation/Foo.html
##
server.modules += ( "mod_Foo" )
##
## foo
##
#foo.bar = 1
##
#######################################################################

47
doc/config/conf.d/mysql_vhost.conf

@ -0,0 +1,47 @@
#######################################################################
##
## Virtual hosting with MySQL
## ----------------------------
##
## http://www.lighttpd.net/documentation/mysqlvhost.html
##
server.modules += ( "mod_mysql_vhost" )
##
## Either set the the socket or host (and port)
##
## Local path to the mysql socket
##
#mysql-vhost.sock = "/var/lib/mysql/mysql.sock"
##
## Host of the MySQL server.
##
#mysql-vhost.hostname = "localhost"
##
## Optional: port to use.
##
#mysql-vhost.port = 3306
##
## Name of the database
##
mysql-vhost.db = "lighttpd"
##
## SQL User/Password for the connection
##
mysql-vhost.user = "lighttpd"
mysql-vhost.pass = "secret"
##
## The query to get the needed informations from the database.
##
## It doesnt matter how you name the fields the first field is always used
## as the document root.
##
mysql-vhost.sql = "SELECT docroot FROM domains WHERE domain='?'"
##
#######################################################################

35
doc/config/conf.d/proxy.conf

@ -0,0 +1,35 @@
#######################################################################
##
## Proxy Module
## ---------------
##
## http://www.lighttpd.net/documentation/proxy.html
##
server.modules += ( "mod_proxy" )
##
## a value between 0 and 65535 to set the debug-level in the Proxy module.
## Currently only 0 and 1 are used. Use 1 to enable some debug output, 0 to
## disable it.
##
#proxy.debug = 1
##
## might be one of 'hash', 'round-robin' or 'fair' (default).
##
#proxy.balance = "fair"
##
## Handle all jsp requests via 192.168.0.101
##
#proxy.server = ( ".jsp" =>
# ( "tomcat" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )
##
#######################################################################

21
doc/config/conf.d/rrdtool.conf

@ -0,0 +1,21 @@
#######################################################################
##
## RRD Tool Module
## -----------------
##
## see http://www.lighttpd.net/documentation/rrdtool.html
##
server.modules += ( "mod_rrdtool" )
##
## Path to the rrdtool binary.
##
rrdtool.binary = "/usr/bin/rrdtool"
##
## Path to the rrdtool database. You can override this in conditionals.
##
rrdtool.db-name = "/var/lib/lighttpd/lighttpd.rrd"
##
#######################################################################

51
doc/config/conf.d/scgi.conf

@ -0,0 +1,51 @@
#######################################################################
##
## FastCGI Module
## ---------------
##
## http://www.lighttpd.net/documentation/scgi.html
##
server.modules += ( "mod_scgi" )
##
## Ruby on Rails Example
##
## Normally you only run one Rails application on one vhost.
##
#$HTTP["host"] == "rails1.example.com" {
# server.document-root = server_root + "/rails/someapp/public"
# server.error-handler-404 = "/dispatch.fcgi"
# scgi.server = ( ".scgi" =>
# ("scgi-someapp" =>
# ( "socket" => socket_dir + "/someapp-scgi.socket",
# "bin-path" => server_root + "/rails/someapp/public/dispatch.scgi",
# "bin-environment" => (
# "RAILS_ENV" => "production",
# "TMP" => home_dir + "/rails/someapp",
# ),
# )
# )
# )
#}
##
## 2nd Ruby on Rails Example
##
## This time we launch the rails application via scgi_rails externally.
##
#$HTTP["host"] == "rails2.example.com" {
# server.document-root = server_root + "/rails/someapp/public"
# server.error-handler-404 = "/dispatch.scgi"
# scgi.server = ( ".scgi" =>
# ( "scgi-tcp" =>
# (
# "host" => "127.0.0.1",
# "port" => 9998,
# "check-local" => "disable",
# )
# )
# )
#}
##
#######################################################################

35
doc/config/conf.d/secdownload.conf

@ -0,0 +1,35 @@
#######################################################################
##
## Secure Download Module
## ------------------------
##
## see http://www.lighttpd.net/documentation/secdownload.html
##
server.modules += ( "mod_secdownload" )
##
## Document root for the download area.
## The directory should not be below your normal
## document root!
##
#secdownload.document-root = server_root + "/downloads"
##
## Secret string that will be used for the checksum calculation.
##
#secdownload.secret = ""
##
## How long is the secret valid?
##
## Default: 60 seconds
##
#secdownload.timeout = 60
##
## Prefix for the download area.
##
#secdownload.uri-prefix = "/download/"
##
#######################################################################

28
doc/config/conf.d/simple_vhost.conf

@ -0,0 +1,28 @@
#######################################################################
##
## Simple Virtual hosting
## ------------------------
##
## http://www.lighttpd.net/documentation/simple-vhost.html
##
server.modules += ( "mod_simple_vhost" )
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
simple-vhost.server-root = vhosts_dir + "/"
simple-vhost.default-host = "default.example.com"
simple-vhost.document-root = "/htdocs/"
##
## Print some errors for finding the document-root
##
#simple-vhost.debug = "enable"
##
#######################################################################

16
doc/config/conf.d/ssi.conf

@ -0,0 +1,16 @@
#######################################################################
##
## Server Side Includes
## -----------------------
##
## see /usr/share/doc/packages/lighttpd/ssi.html
##
server.modules += ( "mod_ssi" )
##
## which extensions should be ran through mod_ssi.
##
ssi.extension = ( ".shtml" )
##
#######################################################################

24
doc/config/conf.d/status.conf

@ -0,0 +1,24 @@
#######################################################################
##
## Status Module
## ---------------
##
## see http://www.lighttpd.net/documentation/status.html
##
server.modules += ( "mod_status" )
$HTTP["remoteip"] == "127.0.0.0/8" {
##
## configure urls for the various parts of the module.
##
status.status-url = "/server-status"
status.config-url = "/server-config"
status.statistics-url = "/server-statistics"
##
## add JavaScript which allows client-side sorting for the connection
## overview
##
status.enable-sort = "enable"
}
##
#######################################################################

70
doc/config/conf.d/trigger_b4_dl.conf

@ -0,0 +1,70 @@
#######################################################################
##
## Trigger before download
## ---------------
##
## - if user requests ''download-url'' directly, the request is denied
## and he is redirected to ''deny-url'
## - if user visits ''trigger-url'' before requesting ''download-url'',
## access is granted
## - if user visits ''download-url'' again after ''trigger-timeout'' has
## elapsed, the request is denied and he is redirected to ''deny-url''
##
## http://www.lighttpd.net/documentation/trigger_b4_dl.html
##
server.modules += ( "mod_mod_trigger_b4_dl" )
##
## To store the trigger state you can either use a local GDBM
## file or memcached(s).
##
##
## Path to the local GDBM file.
##
trigger-before-download.gdbm-filename = home_dir + "/trigger.db"
##
## List of memcached servers.
##
#trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
##
## URL prefix a visitor has to visit before downloading is allowed
##
trigger-before-download.trigger-url = "^/trigger/"
##
## URL Prefix of the proteced area.
##
trigger-before-download.download-url = "^/download/"
##
##
## The deny url.
##
trigger-before-download.deny-url = "http://www.example.com/index.html"
##
## How long the "ticket" of the user will be valid.
##
## Value in seconds.
##
trigger-before-download.trigger-timeout = 10
##
## Normally the memcached key will be the remote ip of the request
## If you store other data in the memcached aswell and want to avoid
## key collisions you can configure a memcache-namespace.
##
## The key for the request will be memcache-namespace + remote_ip than.
##
#trigger-before-download.memcache-namespace = "t4bdl_"
##
## If set to 1, the module will log some debug informations.
##
#trigger-before-download.debug = 0
##
#######################################################################

37
doc/config/conf.d/userdir.conf

@ -0,0 +1,37 @@
#######################################################################
##
## Userdir Module
## ----------------
##
## for all details see:
## http://www.lighttpd.net/documentation/userdir.html
##
server.modules += ( "mod_userdir" )
##
## usually it should be set to "public_html" to take ~/public_html/ as
## the document root
## Default: empty (document root is the home directory)
##
userdir.path = "public_html"
##
## If set, don't check /etc/passwd for homedir
## Default: empty
#userdir.basepath = server_root + "/users/"
##
## list of usernames which may not use this feature
## Default: empty (all users may use it)
##
#userdir.exclude-user = ( "root", "postmaster" )
##
## if set, only users from this list may use the feature
## Default: empty (all users may use it)
##
#userdir.include-user = ("user1", "user2")
##
#######################################################################

33
doc/config/conf.d/webdav.conf

@ -0,0 +1,33 @@
#######################################################################
##
## WebDAV Module
## ---------------
##
## http://www.lighttpd.net/documentation/webdav.html
##
server.modules += ( "mod_webdav" )
$HTTP["url"] =~ "^/dav($|/)" {
##
## enable webdav for this location
##
webdav.activate = "enable"
##
## By default the webdav url is writable.
## Uncomment the following line if you want to make it readonly.
##
#webdav.is-readonly = "enable"
##
## Log the XML Request bodies for debugging
##
#webdav.log-xml = "disable"
##
##
##
webdav.sqlite-db-name = home_dir + "/webdav.db"
}
##
#######################################################################

426
doc/config/lighttpd.conf

@ -0,0 +1,426 @@
#######################################################################
##
## /etc/lighttpd/lighttpd.conf
##
## check /etc/lighttpd/conf.d/*.conf for the configuration of modules.
##
#######################################################################
#######################################################################
##
## Some Variable definition which will make chrooting easier.
##
## if you add a variable here. Add the corresponding variable in the
## chroot example aswell.
##
var.log_root = "/var/log/lighttpd"
var.server_root = "/srv/www"
var.state_dir = "/var/run"
var.home_dir = "/var/lib/lighttpd"
var.conf_dir = "/etc/lighttpd"
##
## run the server chrooted.
##
## This requires root permissions during startup.
##
## If you run Chrooted set the the variables to directories relative to
## the chroot dir.
##
## example chroot configuration:
##
#var.log_root = "/logs"
#var.server_root = "/"
#var.state_dir = "/run"
#var.home_dir = "/lib/lighttpd"
#var.vhosts_dir = "/vhosts"
#var.conf_dir = "/etc"
#
#server.chroot = "/srv/www"
##
## Some additional variables to make the configuration easier
##
##
## Base directory for all virtual hosts
##
## used in:
## conf.d/evhost.conf
## conf.d/simple_vhost.conf
## vhosts.d/vhosts.template
##
var.vhosts_dir = server_root + "/vhosts"
##
## Cache for mod_compress
##
## used in:
## conf.d/compress.conf
##
var.cache_dir = "/var/cache/lighttpd"
##
## Base directory for sockets.
##
## used in:
## conf.d/fastcgi.conf
## conf.d/scgi.conf
##
var.socket_dir = home_dir + "/sockets"
##
#######################################################################
#######################################################################
##
## Load the modules.
include "modules.conf"
##
#######################################################################
#######################################################################
##
## Basic Configuration
## ---------------------
##
server.port = 80
##
## Use IPv6?
##
server.use-ipv6 = "enable"
##
## bind to a specific IP
##
#server.bind = "localhost"
##
## Run as a different username/groupname.
## This requires root permissions during startup.
##
server.username = "lighttpd"
server.groupname = "lighttpd"
##
## enable core files.
##
#server.core-files = "disable"
##
## Document root
##
server.document-root = server_root + "/htdocs"
##
## The value for the "Server:" response field.
##
## It would be nice to keep it at "lighttpd".
##
#server.tag = "lighttpd"
##
## store a pid file
##
server.pid-file = state_dir + "/lighttpd.pid"
##
#######################################################################
#######################################################################
##
## Logging Options
## ------------------
##
## all logging options can be overwritten per vhost.
##
## Path to the error log file
##
server.errorlog = log_root + "/error.log"
##
## If you want to log to syslog you have to unset the
## server.errorlog setting and uncomment the next line.
##
#server.errorlog-use-syslog = "enable"
##
## Access log config
##
include "conf.d/access_log.conf"
##
## The debug options are moved into their own file.
## see conf.d/debug.conf for various options for request debugging.
##
include "conf.d/debug.conf"
##
#######################################################################
#######################################################################
##
## Tuning/Performance
## --------------------
##
## corresponding documentation:
## http://www.lighttpd.net/documentation/performance.html
##
## set the event-handler (read the performance section in the manual)
##
## possible options on linux are:
##
## select
## poll
## linux-sysepoll
##
## linux-sysepoll is recommended on kernel 2.6.
##
server.event-handler = "linux-sysepoll"
##
## The basic network interface for all platforms at the syscalls read()
## and write(). Every modern OS provides its own syscall to help network
## servers transfer files as fast as possible
##
## linux-sendfile - is recommended for small files.
## writev - is recommended for sending many large files
##
server.network-backend = "linux-sendfile"
##
## As lighttpd is a single-threaded server, its main resource limit is
## the number of file descriptors, which is set to 1024 by default (on
## most systems).
##
## If you are running a high-traffic site you might want to increase this
## limit by setting server.max-fds.
##
## Changing this setting requires root permissions on startup. see
## server.username/server.groupname.
##
## By default lighttpd would not change the operation system default.
## But setting it to 2048 is a better default for busy servers.
##
server.max-fds = 2048
##
## Stat() call caching.
##
## lighttpd can utilize FAM/Gamin to cache stat call.
##
## possible values are:
## disable, simple or fam.
##
server.stat-cache-engine = "simple"
##
## Fine tuning for the request handling
##
## max-connections == max-fds/2 (maybe /3)
## means the other file handles are used for fastcgi/files
##
server.max-connections = 1024
##
## How many seconds to keep a keep-alive connection open,
## until we consider it idle.
##
## Default: 5
##
#server.max-keep-alive-idle = 5
##
## How many keep-alive requests until closing the connection.
##
## Default: 16
##
#server.max-keep-alive-requests = 16
##
## Maximum size of a request in kilobytes.
## By default it is unlimited (0).
##
## Uploads to your server cant be larger than this value.
##
#server.max-request-size = 0
##
## Time to read from a socket before we consider it idle.
##
## Default: 60
##
#server.max-read-idle = 60
##
## Time to write to a socket before we consider it idle.
##
## Default: 360
##
#server.max-write-idle = 360
##
## Traffic Shaping
## -----------------
##
## see /usr/share/doc/lighttpd/traffic-shaping.txt
##
## Values are in kilobyte per second.
##
## Keep in mind that a limit below 32kB/s might actually limit the
## traffic to 32kB/s. This is caused by the size of the TCP send
## buffer.
##
## per server:
##
#server.kbytes-per-second = 128
##
## per connection:
##
#connection.kbytes-per-second = 32
##
#######################################################################
#######################################################################
##
## Filename/File handling
## ------------------------
##
## files to check for if .../ is requested
## index-file.names = ( "index.php", "index.rb", "index.html",
## "index.htm", "default.htm" )
##
index-file.names += (
"index.xhtml", "index.html", "index.htm", "default.htm", "index.php"
)
##
## deny access the file-extensions
##
## ~ is for backupfiles from vi, emacs, joe, ...
## .inc is often used for code includes which should in general not be part
## of the document-root
url.access-deny = ( "~", ".inc" )
##
## disable range requests for pdf files
## workaround for a bug in the Acrobat Reader plugin.
##
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
##
## url handling modules (rewrite, redirect)
##
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.example.com/$1" )
##
## both rewrite/redirect support back reference to regex conditional using %n
##
#$HTTP["host"] =~ "^www\.(.*)" {
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#}
##
## which extensions should not be handle via static-file transfer
##
## .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
##
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".scgi" )
##
## error-handler for status 404
##
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
##
#server.errorfile-prefix = "/srv/www/htdocs/errors/status-"
##
## mimetype mapping
##
include "conf.d/mime.conf"
##
## directory listing configuration
##
include "conf.d/dirlisting.conf"
##
## Should lighttpd follow symlinks?
##
server.follow-symlink = "enable"
##
## force all filenames to be lowercase?
##
#server.force-lowercase-filenames = "disable"
##
## defaults to /var/tmp as we assume it is a local harddisk
##
server.upload-dirs = ( "/var/tmp" )
##
#######################################################################
#######################################################################
##
## SSL Support
## -------------
##
## To enable SSL for the whole server you have to provide a valid
## certificate and have to enable the SSL engine.::
##
## ssl.engine = "enable"
## ssl.pemfile = "/path/to/server.pem"
##
## The HTTPS protocol does not allow you to use name-based virtual
## hosting with SSL. If you want to run multiple SSL servers with
## one lighttpd instance you must use IP-based virtual hosting: ::
##
## $SERVER["socket"] == "10.0.0.1:443" {
## ssl.engine = "enable"
## ssl.pemfile = "/etc/ssl/private/www.example.com.pem"
## server.name = "www.example.com"
##
## server.document-root = "/srv/www/vhosts/example.com/www/"
## }
##
## If you have a .crt and a .key file, cat them together into a
## single PEM file:
## $ cat /etc/ssl/private/lighttpd.key /etc/ssl/certs/lighttpd.crt \
## > /etc/ssl/private/lighttpd.pem
##
#ssl.pemfile = "/etc/ssl/private/lighttpd.pem"
##
## optionally pass the CA certificate here.
##
##
#ssl.ca-file = ""
##
#######################################################################
#######################################################################
##
## custom includes like vhosts.
##
#include "conf.d/config.conf"
#include_shell "cat /etc/lighttpd/vhosts.d/*.conf"
##
#######################################################################

172
doc/config/modules.conf

@ -0,0 +1,172 @@
#######################################################################
##
## Modules to load
## -----------------
##
## at least mod_access and mod_accesslog should be loaded
## all other module should only be loaded if really neccesary
##
## - saves some time
## - saves memory
##
## the default module set contains:
##
## "mod_indexfile", "mod_dirlisting", "mod_staticfile"
##
## you dont have to include those modules in your list
##
## Modules, which are pulled in via conf.d/*.conf
##
## NOTE: the order of modules is important.
##
## - mod_accesslog -> conf.d/access_log.conf
## - mod_compress -> conf.d/compress.conf
## - mod_status -> conf.d/status.conf
## - mod_webdav -> conf.d/webdav.conf
## - mod_cml -> conf.d/cml.conf
## - mod_evhost -> conf.d/evhost.conf
## - mod_simple_vhost -> conf.d/simple_vhost.conf
## - mod_mysql_vhost -> conf.d/mysql_vhost.conf
## - mod_trigger_b4_dl -> conf.d/trigger_b4_dl.conf
## - mod_userdir -> conf.d/userdir.conf
## - mod_rrdtool -> conf.d/rrdtool.conf
## - mod_ssi -> conf.d/ssi.conf
## - mod_cgi -> conf.d/cgi.conf
## - mod_scgi -> conf.d/scgi.conf
## - mod_fastcgi -> conf.d/fastcgi.conf
## - mod_proxy -> conf.d/proxy.conf
## - mod_secdownload -> conf.d/secdownload.conf
## - mod_expire -> conf.d/expire.conf
##
server.modules = (
"mod_access",
# "mod_alias",
# "mod_auth",
# "mod_evasive",
# "mod_redirect",
# "mod_rewrite",
# "mod_setenv",
# "mod_usertrack",
)
##
#######################################################################
#######################################################################
##
## Config for various Modules
##
##
## mod_ssi
##
#include "conf.d/ssi.conf"
##
## mod_status
##
#include "conf.d/status.conf"
##
## mod_webdav
##
#include "conf.d/webdav.conf"
##
## mod_compress
##
#include "conf.d/compress.conf"
##
## mod_userdir
##
#include "conf.d/userdir.conf"
##
## mod_magnet
##
#include "conf.d/magnet.conf"
##
## mod_cml
##
#include "conf.d/cml.conf"
##
## mod_rrdtool
##
#include "conf.d/rrdtool.conf"
##
## mod_proxy
##
#include "conf.d/proxy.conf"
##
## mod_expire
##
#include "conf.d/expire.conf"
##
## mod_secdownload
##
#include "conf.d/secdownload.conf"
##
#######################################################################
#######################################################################
##
## CGI modules
##
##
## SCGI (mod_scgi)
##
#include "conf.d/scgi.conf"
##
## FastCGI (mod_fastcgi)
##
#include "conf.d/fastcgi.conf"
##
## plain old CGI (mod_cgi)
##
#include "conf.d/cgi.conf"
##
#######################################################################
#######################################################################
##
## VHost Modules
##
## Only load ONE of them!
## ========================
##
##
## You can use conditionals for vhosts aswell.
##
## see http://www.lighttpd.net/documentation/configuration.html
##
##
## mod_evhost
##
#include "conf.d/evhost.conf"
##
## mod_simple_vhost
##
#include "conf.d/simple_vhost.conf"
##
## mod_mysql_vhost
##
#include "conf.d/mysql_vhost.conf"
##
#######################################################################

33
doc/config/vhosts.d/vhosts.template

@ -0,0 +1,33 @@
#######################################################################
##
## For more examples check:
##
## http://www.lighttpd.net/documentation/configuration.html#conditional-configuration
##
$HTTP["host"] == "download.example.com" {
var.server_name = "download.example.com"
server.name = server_name
##
## use trigger before download
##
include "conf.d/trigger_b4_dl.conf"
server.document-root = vhosts_dir + "/example.com/download/htdocs"
##
## use a seperate access log file
## At the moment you cant have different error log files.
##
accesslog.filename = log_root + "/" + server_name "/access.log"
}
$SERVER["socket"] == "127.0.0.1:443" {
server.name = "localhost"
ssl.pemfile = "/etc/ssl/private/lighttpd-localhost.pem"
ssl.engine = "enable"
server.document-root = vhosts_dir + "/ssl-localhost/pages/"
}
##
#######################################################################

322
doc/lighttpd.conf

@ -1,322 +0,0 @@
# lighttpd configuration file
#
# use it as a base for lighttpd 1.0.0 and above
#
# $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
############ Options you really have to take care of ####################
## modules to load
# at least mod_access and mod_accesslog should be loaded
# all other module should only be loaded if really neccesary
# - saves some time
# - saves memory
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_fastcgi",
# "mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )
## A static document-root. For virtual hosting take a look at the
## mod_simple_vhost module.
server.document-root = "/srv/www/htdocs/"
## where to send error-messages to
server.errorlog = "/var/log/lighttpd/error.log"
# files to check for if .../ is requested
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm" )
## set the event-handler (read the performance section in the manual)
# server.event-handler = "freebsd-kqueue" # needed on OS X
# mimetype mapping
mimetype.assign = (
".pdf" => "application/pdf",
".sig" => "application/pgp-signature",
".spl" => "application/futuresplash",
".class" => "application/octet-stream",
".ps" => "application/postscript",
".torrent" => "application/x-bittorrent",
".dvi" => "application/x-dvi",
".gz" => "application/x-gzip",
".pac" => "application/x-ns-proxy-autoconfig",
".swf" => "application/x-shockwave-flash",
".tar.gz" => "application/x-tgz",
".tgz" => "application/x-tgz",
".tar" => "application/x-tar",
".zip" => "application/zip",
".mp3" => "audio/mpeg",
".m3u" => "audio/x-mpegurl",
".wma" => "audio/x-ms-wma",
".wax" => "audio/x-ms-wax",
".ogg" => "application/ogg",
".wav" => "audio/x-wav",
".gif" => "image/gif",
".jar" => "application/x-java-archive",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".xwd" => "image/x-xwindowdump",
".css" => "text/css",
".html" => "text/html",
".htm" => "text/html",
".js" => "text/javascript",
".asc" => "text/plain",
".c" => "text/plain",
".cpp" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".text" => "text/plain",
".txt" => "text/plain",
".dtd" => "text/xml",
".xml" => "text/xml",
".mpeg" => "video/mpeg",
".mpg" => "video/mpeg",
".mov" => "video/quicktime",
".qt" => "video/quicktime",
".avi" => "video/x-msvideo",
".asf" => "video/x-ms-asf",
".asx" => "video/x-ms-asf",
".wmv" => "video/x-ms-wmv",
".bz2" => "application/x-bzip",
".tbz" => "application/x-bzip-compressed-tar",
".tar.bz2" => "application/x-bzip-compressed-tar",
# default mime type
"" => "application/octet-stream",
)
# Use the "Content-Type" extended attribute to obtain mime type if possible
#mimetype.use-xattr = "enable"
## send a different Server: header
## be nice and keep it at lighttpd
# server.tag = "lighttpd"
#### accesslog module
accesslog.filename = "/var/log/lighttpd/access.log"
## deny access the file-extensions
#
# ~ is for backupfiles from vi, emacs, joe, ...
# .inc is often used for code includes which should in general not be part
# of the document-root
url.access-deny = ( "~", ".inc" )
$HTTP["url"] =~ "\.pdf$" {
server.range-requests = "disable"
}
##
# which extensions should not be handle via static-file transfer
#
# .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
######### Options that are good to be but not neccesary to be changed #######
## bind to port (default: 80)
#server.port = 81
## bind to localhost (default: all interfaces)
#server.bind = "127.0.0.1"
## error-handler for status 404
#server.error-handler-404 = "/error-handler.html"
#server.error-handler-404 = "/error-handler.php"
## to help the rc.scripts
#server.pid-file = "/var/run/lighttpd.pid"
###### virtual hosts
##
## If you want name-based virtual hosting add the next three settings and load
## mod_simple_vhost
##
## document-root =
## virtual-server-root + virtual-server-default-host + virtual-server-docroot
## or
## virtual-server-root + http-host + virtual-server-docroot
##
#simple-vhost.server-root = "/srv/www/vhosts/"
#simple-vhost.default-host = "www.example.org"
#simple-vhost.document-root = "/htdocs/"
##
## Format: <errorfile-prefix><status-code>.html
## -> ..../status-404.html for 'File not found'
#server.errorfile-prefix = "/usr/share/lighttpd/errors/status-"
#server.errorfile-prefix = "/srv/www/errors/status-"
## virtual directory listings
#dir-listing.activate = "enable"
## select encoding for directory listings
#dir-listing.encoding = "utf-8"
## enable debugging
#debug.log-request-header = "enable"
#debug.log-response-header = "enable"
#debug.log-request-handling = "enable"
#debug.log-file-not-found = "enable"
### only root can use these options
#
# chroot() to directory (default: no chroot() )
#server.chroot = "/"
## change uid to <uid> (default: don't care)
#server.username = "wwwrun"
## change uid to <uid> (default: don't care)
#server.groupname = "wwwrun"
#### compress module
#compress.cache-dir = "/var/cache/lighttpd/compress/"
#compress.filetype = ("text/plain", "text/html")
#### proxy module
## read proxy.txt for more info
#proxy.server = ( ".php" =>
# ( "localhost" =>
# (
# "host" => "192.168.0.101",
# "port" => 80
# )
# )
# )
#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
#fastcgi.server = ( ".php" =>
# ( "localhost" =>
# (
# "socket" => "/var/run/lighttpd/php-fastcgi.socket",
# "bin-path" => "/usr/local/bin/php-cgi"
# )
# )
# )
#### CGI module
#cgi.assign = ( ".pl" => "/usr/bin/perl",
# ".cgi" => "/usr/bin/perl" )
#
#### SSL engine
#ssl.engine = "enable"
#ssl.pemfile = "/etc/ssl/private/lighttpd.pem"
#### status module
#status.status-url = "/server-status"
#status.config-url = "/server-config"
#### auth module
## read authentication.txt for more info
#auth.backend = "plain"
#auth.backend.plain.userfile = "lighttpd.user"
#auth.backend.plain.groupfile = "lighttpd.group"
#auth.backend.ldap.hostname = "localhost"
#auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
#auth.backend.ldap.filter = "(uid=$)"
#auth.require = ( "/server-status" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "user=jan"
# ),
# "/server-config" =>
# (
# "method" => "digest",
# "realm" => "download archiv",
# "require" => "valid-user"
# )
# )
#### url handling modules (rewrite, redirect, access)
#url.rewrite = ( "^/$" => "/server-status" )
#url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
#### both rewrite/redirect support back reference to regex conditional using %n
#$HTTP["host"] =~ "^www\.(.*)" {
# url.redirect = ( "^/(.*)" => "http://%1/$1" )
#}
#
# define a pattern for the host url finding
# %% => % sign
# %0 => domain name + tld
# %1 => tld
# %2 => domain name without tld
# %3 => subdomain 1 name
# %4 => subdomain 2 name
#
#evhost.path-pattern = "/srv/www/vhosts/%3/htdocs/"
#### expire module
#expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
#### ssi