spacepaste

  1.  
  2. ###############################################################################
  3. # Default lighttpd.conf for Gentoo.
  4. ###############################################################################
  5. # {{{ variables
  6. var.basedir = "/var/www/localhost"
  7. var.logdir = "/var/log/lighttpd"
  8. var.statedir = "/var/lib/lighttpd"
  9. # }}}
  10. # {{{ modules
  11. # At the very least, mod_access and mod_accesslog should be enabled.
  12. # All other modules should only be loaded if necessary.
  13. # NOTE: the order of modules is important.
  14. server.modules = (
  15. # "mod_rewrite",
  16. # "mod_redirect",
  17. # "mod_alias",
  18. "mod_access",
  19. # "mod_cml",
  20. # "mod_trigger_b4_dl",
  21. # "mod_auth",
  22. # "mod_status",
  23. # "mod_setenv",
  24. # "mod_proxy",
  25. # "mod_simple_vhost",
  26. # "mod_evhost",
  27. # "mod_userdir",
  28. # "mod_compress",
  29. # "mod_ssi",
  30. # "mod_usertrack",
  31. # "mod_expire",
  32. # "mod_secdownload",
  33. # "mod_rrdtool",
  34. # "mod_webdav",
  35. "mod_accesslog"
  36. )
  37. # }}}
  38. # {{{ includes
  39. include "mime-types.conf"
  40. # fcgi and cgi are included below
  41. # }}}
  42. # {{{ server settings
  43. server.username = "lighttpd"
  44. server.groupname = "lighttpd"
  45. server.document-root = var.basedir + "/htdocs"
  46. server.pid-file = "/var/run/lighttpd.pid"
  47. server.errorlog = var.logdir + "/error.log"
  48. # log errors to syslog instead
  49. # server.errorlog-use-syslog = "enable"
  50. server.indexfiles = ("index.php", "index.html",
  51. "index.htm", "default.htm")
  52. # server.tag = "lighttpd"
  53. server.follow-symlink = "enable"
  54. # event handler (defaults to "poll")
  55. # see performance.txt
  56. #
  57. # for >= linux-2.4
  58. # server.event-handler = "linux-rtsig"
  59. # for >= linux-2.6
  60. # server.event-handler = "linux-sysepoll"
  61. # for FreeBSD
  62. # server.event-handler = "freebsd-kqueue"
  63. # chroot to directory (defaults to no chroot)
  64. # server.chroot = "/"
  65. # bind to port (defaults to 80)
  66. # server.port = 81
  67. # bind to name (defaults to all interfaces)
  68. # server.bind = "grisu.home.kneschke.de"
  69. # error-handler for status 404
  70. # server.error-handler-404 = "/error-handler.html"
  71. # server.error-handler-404 = "/error-handler.php"
  72. # Format: <errorfile-prefix><status-code>.html
  73. # -> ..../status-404.html for 'File not found'
  74. # server.errorfile-prefix = var.basedir + "/error/status-"
  75. # FAM support for caching stat() calls
  76. # requires that lighttpd be built with USE=fam
  77. server.stat-cache-engine = "fam"
  78. # If lighttpd was build with IPv6 support, and you would like to listen on IPv6,
  79. # uncomment the following:
  80. server.use-ipv6 = "enable"
  81. # }}}
  82. # {{{ mod_staticfile
  83. # which extensions should not be handled via static-file transfer
  84. # (extensions that are usually handled by mod_cgi, mod_fastcgi, etc).
  85. static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
  86. # }}}
  87. # {{{ mod_accesslog
  88. accesslog.filename = var.logdir + "/access.log"
  89. # }}}
  90. # {{{ mod_dirlisting
  91. # enable directory listings
  92. # dir-listing.activate = "enable"
  93. #
  94. # don't list hidden files/directories
  95. # dir-listing.hide-dotfiles = "enable"
  96. #
  97. # use a different css for directory listings
  98. # dir-listing.external-css = "/path/to/dir-listing.css"
  99. #
  100. # list of regular expressions. files that match any of the
  101. # specified regular expressions will be excluded from directory
  102. # listings.
  103. # dir-listing.exclude = ("^\.", "~$")
  104. # }}}
  105. # {{{ mod_access
  106. # see access.txt
  107. url.access-deny = ("~", ".inc")
  108. # }}}
  109. # {{{ mod_userdir
  110. # see userdir.txt
  111. #
  112. # userdir.path = "public_html"
  113. # userdir.exclude-user = ("root")
  114. # }}}
  115. # {{{ mod_ssi
  116. # see ssi.txt
  117. #
  118. # ssi.extension = (".shtml")
  119. # }}}
  120. # {{{ mod_ssl
  121. # see ssl.txt
  122. #
  123. # ssl.engine = "enable"
  124. # ssl.pemfile = "server.pem"
  125. # }}}
  126. # {{{ mod_status
  127. # see status.txt
  128. #
  129. # status.status-url = "/server-status"
  130. # status.config-url = "/server-config"
  131. # }}}
  132. # {{{ mod_simple_vhost
  133. # see simple-vhost.txt
  134. #
  135. # If you want name-based virtual hosting add the next three settings and load
  136. # mod_simple_vhost
  137. #
  138. # document-root =
  139. # virtual-server-root + virtual-server-default-host + virtual-server-docroot
  140. # or
  141. # virtual-server-root + http-host + virtual-server-docroot
  142. #
  143. # simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
  144. # simple-vhost.default-host = "grisu.home.kneschke.de"
  145. # simple-vhost.document-root = "/pages/"
  146. # }}}
  147. # {{{ mod_compress
  148. # see compress.txt
  149. #
  150. # compress.cache-dir = var.statedir + "/cache/compress"
  151. # compress.filetype = ("text/plain", "text/html")
  152. # }}}
  153. # {{{ mod_proxy
  154. # see proxy.txt
  155. #
  156. # proxy.server = ( ".php" =>
  157. # ( "localhost" =>
  158. # (
  159. # "host" => "192.168.0.101",
  160. # "port" => 80
  161. # )
  162. # )
  163. # )
  164. # }}}
  165. # {{{ mod_auth
  166. # see authentication.txt
  167. #
  168. # auth.backend = "plain"
  169. # auth.backend.plain.userfile = "lighttpd.user"
  170. # auth.backend.plain.groupfile = "lighttpd.group"
  171. # auth.backend.ldap.hostname = "localhost"
  172. # auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
  173. # auth.backend.ldap.filter = "(uid=$)"
  174. # auth.require = ( "/server-status" =>
  175. # (
  176. # "method" => "digest",
  177. # "realm" => "download archiv",
  178. # "require" => "user=jan"
  179. # ),
  180. # "/server-info" =>
  181. # (
  182. # "method" => "digest",
  183. # "realm" => "download archiv",
  184. # "require" => "valid-user"
  185. # )
  186. # )
  187. # }}}
  188. # {{{ mod_rewrite
  189. # see rewrite.txt
  190. #
  191. # url.rewrite = (
  192. # "^/$" => "/server-status"
  193. # )
  194. # }}}
  195. # {{{ mod_redirect
  196. # see redirect.txt
  197. #
  198. # url.redirect = (
  199. # "^/wishlist/(.+)" => "http://www.123.org/$1"
  200. # )
  201. # }}}
  202. # {{{ mod_evhost
  203. # define a pattern for the host url finding
  204. # %% => % sign
  205. # %0 => domain name + tld
  206. # %1 => tld
  207. # %2 => domain name without tld
  208. # %3 => subdomain 1 name
  209. # %4 => subdomain 2 name
  210. #
  211. # evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
  212. # }}}
  213. # {{{ mod_expire
  214. # expire.url = (
  215. # "/buggy/" => "access 2 hours",
  216. # "/asdhas/" => "access plus 1 seconds 2 minutes"
  217. # )
  218. # }}}
  219. # {{{ mod_rrdtool
  220. # see rrdtool.txt
  221. #
  222. # rrdtool.binary = "/usr/bin/rrdtool"
  223. # rrdtool.db-name = var.statedir + "/lighttpd.rrd"
  224. # }}}
  225. # {{{ mod_setenv
  226. # see setenv.txt
  227. #
  228. # setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
  229. # setenv.add-response-header = ( "X-Secret-Message" => "42" )
  230. # }}}
  231. # {{{ mod_trigger_b4_dl
  232. # see trigger_b4_dl.txt
  233. #
  234. # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
  235. # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
  236. # trigger-before-download.trigger-url = "^/trigger/"
  237. # trigger-before-download.download-url = "^/download/"
  238. # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
  239. # trigger-before-download.trigger-timeout = 10
  240. # }}}
  241. # {{{ mod_cml
  242. # see cml.txt
  243. #
  244. # don't forget to add index.cml to server.indexfiles
  245. # cml.extension = ".cml"
  246. # cml.memcache-hosts = ( "127.0.0.1:11211" )
  247. # }}}
  248. # {{{ mod_webdav
  249. # see webdav.txt
  250. #
  251. # $HTTP["url"] =~ "^/dav($|/)" {
  252. # webdav.activate = "enable"
  253. # webdav.is-readonly = "enable"
  254. # }
  255. # }}}
  256. # {{{ extra rules
  257. #
  258. # set Content-Encoding and reset Content-Type for browsers that
  259. # support decompressing on-thy-fly (requires mod_setenv)
  260. # $HTTP["url"] =~ "\.gz$" {
  261. # setenv.add-response-header = ("Content-Encoding" => "x-gzip")
  262. # mimetype.assign = (".gz" => "text/plain")
  263. # }
  264. # $HTTP["url"] =~ "\.bz2$" {
  265. # setenv.add-response-header = ("Content-Encoding" => "x-bzip2")
  266. # mimetype.assign = (".bz2" => "text/plain")
  267. # }
  268. #
  269. # }}}
  270. # {{{ debug
  271. # debug.log-request-header = "enable"
  272. # debug.log-response-header = "enable"
  273. # debug.log-request-handling = "enable"
  274. # debug.log-file-not-found = "enable"
  275. # }}}
  276. # {{{ cgi includes
  277. # uncomment for cgi support
  278. # include "mod_cgi.conf"
  279. # uncomment for php/fastcgi support
  280. # include "mod_fastcgi.conf"
  281. # }}}
  282. # vim: set ft=conf foldmethod=marker et :
  283. # add this to the end of the standard configuration
  284. server.modules += ( "mod_alias" )
  285. alias.url = ( "/packages" => "/usr/portage/packages/" )
  286.