You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

231 lines
5.8 KiB

  1. # lighttpd configuration file
  2. #
  3. ## modules to load
  4. # all other module should only be loaded if really neccesary
  5. # - saves some time
  6. # - saves memory
  7. #server.modules = (
  8. # "mod_rewrite",
  9. # "mod_redirect",
  10. # "mod_alias",
  11. # "mod_auth",
  12. # "mod_status",
  13. # "mod_setenv",
  14. # "mod_fastcgi",
  15. # "mod_proxy",
  16. # "mod_simple_vhost",
  17. # "mod_cgi",
  18. # "mod_ssi",
  19. # "mod_usertrack",
  20. # "mod_expire",
  21. # "mod_webdav"
  22. #)
  23. # force use of the "write" backend (closes: #2401)
  24. server.network-backend = "write"
  25. ## a static document-root, for virtual-hosting take look at the
  26. ## server.virtual-* options
  27. server.document-root = "/www/"
  28. ## where to send error-messages to
  29. #server.errorlog = "/var/log/lighttpd/error.log"
  30. ## files to check for if .../ is requested
  31. index-file.names = ( "index.html", "default.html", "index.htm", "default.htm" )
  32. ## mimetype mapping
  33. mimetype.assign = (
  34. ".pdf" => "application/pdf",
  35. ".class" => "application/octet-stream",
  36. ".pac" => "application/x-ns-proxy-autoconfig",
  37. ".swf" => "application/x-shockwave-flash",
  38. ".wav" => "audio/x-wav",
  39. ".gif" => "image/gif",
  40. ".jpg" => "image/jpeg",
  41. ".jpeg" => "image/jpeg",
  42. ".png" => "image/png",
  43. ".svg" => "image/svg+xml",
  44. ".css" => "text/css",
  45. ".html" => "text/html",
  46. ".htm" => "text/html",
  47. ".js" => "text/javascript",
  48. ".txt" => "text/plain",
  49. ".dtd" => "text/xml",
  50. ".xml" => "text/xml"
  51. )
  52. ## Use the "Content-Type" extended attribute to obtain mime type if possible
  53. #mimetypes.use-xattr = "enable"
  54. ## send a different Server: header
  55. ## be nice and keep it at lighttpd
  56. #server.tag = "lighttpd"
  57. $HTTP["url"] =~ "\.pdf$" {
  58. server.range-requests = "disable"
  59. }
  60. ##
  61. # which extensions should not be handle via static-file transfer
  62. #
  63. # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
  64. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
  65. ######### Options that are good to be but not neccesary to be changed #######
  66. ## bind to port (default: 80)
  67. #server.port = 81
  68. ## bind to localhost (default: all interfaces)
  69. #server.bind = "localhost"
  70. ## error-handler for status 404
  71. #server.error-handler-404 = "/error-handler.html"
  72. #server.error-handler-404 = "/error-handler.php"
  73. ## to help the rc.scripts
  74. server.pid-file = "/var/run/lighttpd.pid"
  75. ###### virtual hosts
  76. ##
  77. ## If you want name-based virtual hosting add the next three settings and load
  78. ## mod_simple_vhost
  79. ##
  80. ## document-root =
  81. ## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
  82. ## virtual-server-root + http-host + virtual-server-docroot
  83. ##
  84. #simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
  85. #simple-vhost.default-host = "grisu.home.kneschke.de"
  86. #simple-vhost.document-root = "/pages/"
  87. ##
  88. ## Format: <errorfile-prefix><status>.html
  89. ## -> ..../status-404.html for 'File not found'
  90. #server.errorfile-prefix = "/www/error-"
  91. ## virtual directory listings
  92. #server.dir-listing = "enable"
  93. ## send unhandled HTTP-header headers to error-log
  94. #debug.dump-unknown-headers = "enable"
  95. ### only root can use these options
  96. #
  97. # chroot() to directory (default: no chroot() )
  98. #server.chroot = "/"
  99. ## change uid to <uid> (default: don't care)
  100. #server.username = "nobody"
  101. #
  102. server.upload-dirs = ( "/tmp" )
  103. ## change uid to <uid> (default: don't care)
  104. #server.groupname = "nobody"
  105. #### compress module
  106. #compress.cache-dir = "/dev/null/"
  107. #compress.filetype = ("text/plain", "text/html")
  108. #### proxy module
  109. ## read proxy.txt for more info
  110. #proxy.server = (
  111. # ".php" => (
  112. # "localhost" => (
  113. # "host" => "192.168.0.101",
  114. # "port" => 80
  115. # )
  116. # )
  117. #)
  118. #### fastcgi module
  119. ## read fastcgi.txt for more info
  120. #fastcgi.server = (
  121. # ".php" => (
  122. # "localhost" => (
  123. # "socket" => "/tmp/php-fastcgi.socket",
  124. # "bin-path" => "/usr/local/bin/php"
  125. # )
  126. # )
  127. #)
  128. #### CGI module
  129. #cgi.assign = ( ".pl" => "/usr/bin/perl", ".cgi" => "/usr/bin/perl" )
  130. #### SSL engine
  131. #ssl.engine = "enable"
  132. #ssl.pemfile = "server.pem"
  133. #### status module
  134. #status.status-url = "/server-status"
  135. #status.config-url = "/server-config"
  136. #### auth module
  137. ## read authentification.txt for more info
  138. #auth.backend = "plain"
  139. #auth.backend.plain.userfile = "lighttpd.user"
  140. #auth.backend.plain.groupfile = "lighttpd.group"
  141. #auth.require = (
  142. # "/server-status" => (
  143. # "method" => "digest",
  144. # "realm" => "download archiv",
  145. # "require" => "group=www|user=jan|host=192.168.2.10"
  146. # ),
  147. # "/server-info" => (
  148. # "method" => "digest",
  149. # "realm" => "download archiv",
  150. # "require" => "group=www|user=jan|host=192.168.2.10"
  151. # )
  152. #)
  153. #### url handling modules (rewrite, redirect, access)
  154. #url.rewrite = ( "^/$" => "/server-status" )
  155. #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
  156. #### both rewrite/redirect support back reference to regex conditional using %n
  157. #$HTTP["host"] =~ "^www\.(.*)" {
  158. # url.redirect = ( "^/(.*)" => "http://%1/$1" )
  159. #}
  160. #### expire module
  161. #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
  162. #### ssi
  163. #ssi.extension = ( ".shtml" )
  164. #### setenv
  165. #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
  166. #setenv.add-response-header = ( "X-Secret-Message" => "42" )
  167. #### variable usage:
  168. ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
  169. #bar = 1
  170. #var.mystring = "foo"
  171. ## integer add
  172. #bar += 1
  173. ## string concat, with integer cast as string, result: "www.foo1.com"
  174. #server.name = "www." + mystring + var.bar + ".com"
  175. ## array merge
  176. #index-file.names = (foo + ".php") + index-file.names
  177. #index-file.names += (foo + ".php")
  178. #### include
  179. #include /etc/lighttpd/lighttpd-inc.conf
  180. ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
  181. #include "lighttpd-inc.conf"
  182. #### include_shell
  183. #include_shell "echo var.a=1"
  184. ## the above is same as:
  185. #var.a=1
  186. #### webdav
  187. #$HTTP["url"] =~ "^/webdav($|/)" {
  188. # webdav.activate = "enable"
  189. # webdav.is-readonly = "enable"
  190. # webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
  191. #}