Advertisement
zinc55

lighttpd conf

May 1st, 2013
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.95 KB | None | 0 0
  1. # LightTPD Configuration file (CORE)
  2. #
  3. # Use it as a base for LightTPD 1.0.0 and above.
  4. # This version is built by WLMP Project - http://en.wlmp.project.net/
  5. #
  6. # $Id: lighttpd.conf,v 1.8 2012/02/07 19:30:32 dtech Exp $
  7.  
  8. ############ Options you really have to take care of ####################
  9.  
  10. ## modules to load
  11. # at least mod_access and mod_accesslog should be loaded
  12. # all other module should only be loaded if really neccesary
  13. # - saves some time
  14. # - saves memory
  15. server.modules = (
  16. "mod_access",
  17. "mod_alias",
  18. "mod_accesslog",
  19. "mod_auth",
  20. "mod_ssi",
  21. "mod_cgi",
  22. "mod_compress",
  23. "mod_fastcgi",
  24. "mod_rewrite",
  25. "mod_magnet",
  26. )
  27.  
  28. #### include important configuration files
  29. ## include path variables
  30. include "variables.conf"
  31. ## include mimetype mapping file
  32. include "mimetype.conf"
  33. ## include virtual hosts (optional)
  34. #include "vhosts.conf"
  35.  
  36. ## a static document-root, for virtual-hosting take look at the
  37. ## server.virtual-* options
  38. server.document-root = server_root + "/htdocs"
  39.  
  40. #directory for file uploads
  41. server.upload-dirs = ( temp_dir )
  42.  
  43. # files to check for if .../ is requested
  44. index-file.names = ( "index.php", "index.pl", "index.cgi", "index.cml",
  45. "index.html", "index.htm", "default.htm" )
  46.  
  47. ## set the event-handler (read the performance section in the manual)
  48. server.event-handler = "libev"
  49.  
  50. ## deny access the file-extensions
  51. #
  52. # ~ is for backupfiles from vi, emacs, joe, ...
  53. # .inc is often used for code includes which should in general not be part
  54. # of the document-root
  55. url.access-deny = ( "~", ".inc" )
  56.  
  57. ## disable range request for PDF files
  58. $HTTP["url"] =~ "\.pdf$" {
  59. server.range-requests = "disable"
  60. }
  61.  
  62. ## static-file module
  63. # which extensions should not be handle via static-file transfer
  64. #
  65. # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
  66. static-file.exclude-extensions = ( ".php", ".pl", ".cgi" )
  67.  
  68. ######### Options that are good to be but not neccesary to be changed #######
  69.  
  70. ## enable ipv6 usage
  71. #server.use-ipv6 = "enable"
  72.  
  73. ## bind to port (default: 80)
  74. #server.port = 80
  75.  
  76. ## bind to localhost (default: all interfaces)
  77. #server.bind = "mydomain.org"
  78.  
  79.  
  80. ###### virtual hosts
  81. ##
  82. ## If you want name-based virtual hosting add the next three settings and load
  83. ## mod_simple_vhost
  84. ##
  85. ## document-root =
  86. ## virtual-server-root + virtual-server-default-host + virtual-server-docroot
  87. ## or
  88. ## virtual-server-root + http-host + virtual-server-docroot
  89. ##
  90. #simple-vhost.server-root = server_root
  91. #simple-vhost.default-host = "vhost.mydomain.org"
  92. #simple-vhost.document-root = "/vhosts"
  93.  
  94. ## alias module
  95. #alias.url = ( "/documentation" => "manual" )
  96.  
  97. ## custom error pages
  98. ## Format: <errorfile-prefix><status-code>.html
  99. ## -> ..../status-404.html for 'File not found'
  100. #server.errorfile-prefix = "errors/status-"
  101.  
  102. ## error-handler for status 404
  103. #server.error-handler-404 = "/error-handler.html"
  104. #server.error-handler-404 = "/error-handler.php"
  105.  
  106. ## virtual directory listings
  107. dir-listing.activate = "enable"
  108. #dir-listing.encoding = "utf-8"
  109. #dir-listing.external-css = server_root + "style/style.css"
  110.  
  111. ## enable debugging
  112. #debug.log-request-header = "enable"
  113. #debug.log-response-header = "enable"
  114. #debug.log-request-handling = "enable"
  115. #debug.log-file-not-found = "enable"
  116.  
  117. #### compress module
  118. #compress.cache-dir = temp_dir + "/cache/compress"
  119. #compress.filetype = ("text/plain", "text/html")
  120.  
  121. #### proxy module
  122. ## read proxy.txt for more info
  123. #proxy.server = ( ".php" =>
  124. # ( "localhost" =>
  125. # (
  126. # "host" => "192.168.0.101",
  127. # "port" => 80
  128. # )
  129. # )
  130. # )
  131.  
  132. #### fastcgi module
  133. ## read fastcgi.txt for more info
  134. ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
  135. ## ... and PHP_FCGI_MAX_REQUESTS = 0 environment variable in system properties
  136. #fastcgi.server = ( ".php" =>
  137. # ( "localhost" =>
  138. # (
  139. # "host" => "127.0.0.1",
  140. # "port" => 9000
  141. # )
  142. # )
  143. # )
  144.  
  145. ## map multiple extensions to the same fastcgi server
  146. #fastcgi.map-extensions = ( ".php3" => ".php",
  147. # ".php4" => ".php" )
  148.  
  149. #### CGI module
  150. #cgi.assign = ( ".php" => "C:/PHP/php-cgi.exe",
  151. # ".pl" => "C:/Perl/perl.exe",
  152. # ".cgi" => "C:/Perl/perl.exe" )
  153.  
  154.  
  155. #### SSL engine
  156. #ssl.engine = "enable"
  157. #ssl.pemfile = cert_dir + "/server.pem"
  158.  
  159. #### status module
  160. status.status-url = "/server-status"
  161. status.config-url = "/server-config"
  162. ## fcgi statistics
  163. #status.statistics-url = "/server-counters"
  164.  
  165. #### auth module
  166. ## read authentication.txt for more info
  167. #auth.backend = "plain"
  168. #auth.backend.plain.userfile = conf_dir + "/auth.user"
  169. #auth.backend.plain.groupfile = conf_dir + "/auth.group"
  170.  
  171. #auth.backend.ldap.hostname = "localhost"
  172. #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
  173. #auth.backend.ldap.filter = "(uid=$)"
  174.  
  175. #auth.require = ( "/server-status" =>
  176. # (
  177. # "method" => "digest",
  178. # "realm" => "Server status",
  179. # "require" => "user=admin"
  180. # ),
  181. # "/server-config" =>
  182. # (
  183. # "method" => "digest",
  184. # "realm" => "Server config",
  185. # "require" => "user=admin"
  186. # )
  187. # )
  188.  
  189. #### url handling modules (rewrite, redirect, access)
  190. #url.rewrite = ( "^/$" => "/server-status" )
  191. #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
  192.  
  193. #### both rewrite/redirect support back reference to regex conditional using %n
  194. #$HTTP["host"] =~ "^www\.(.*)" {
  195. # url.redirect = ( "^/(.*)" => "http://%1/$1" )
  196. #}
  197.  
  198. #### evhost module
  199. # define a pattern for the host url finding
  200. # %% => % sign
  201. # %0 => domain name + tld
  202. # %1 => tld
  203. # %2 => domain name without tld
  204. # %3 => subdomain 1 name
  205. # %4 => subdomain 2 name
  206. #
  207. #evhost.path-pattern = server_root + "/htdocs"
  208.  
  209. #### expire module
  210. #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
  211.  
  212. #### ssi
  213. #ssi.extension = ( ".shtml" )
  214.  
  215. #### rrdtool
  216. #rrdtool.binary = "C:/RRDtool/rrdtool.exe"
  217. #rrdtool.db-name = temp_dir + "/lighttpd.rrd"
  218.  
  219. #### setenv
  220. #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
  221. #setenv.add-response-header = ( "X-Secret-Message" => "42" )
  222.  
  223. ## for mod_trigger_b4_dl
  224. #trigger-before-download.gdbm-filename = "C:/GDBM/testbase/trigger.db"
  225. #trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
  226. #trigger-before-download.trigger-url = "^/trigger/"
  227. #trigger-before-download.download-url = "^/download/"
  228. #trigger-before-download.deny-url = "http://127.0.0.1/index.html"
  229. #trigger-before-download.trigger-timeout = 10
  230.  
  231. #### for mod_cml
  232. ## don't forget to add index.cml to server.indexfiles
  233. #cml.extension = ".cml"
  234. #cml.memcache-hosts = ( "127.0.0.1:11211" )
  235.  
  236. #### mysql vhost
  237. ## unix sockets don't work under windows environment, but you can use TCP connection instead of socket
  238. #mysql-vhost.hostname = "127.0.0.1" # if set overrides socket
  239. #mysql-vhost.port = 3306
  240. #mysql-vhost.user = "lighttpd"
  241. #mysql-vhost.pass = "secret"
  242. #mysql-vhost.db = "lighttpd"
  243. #mysql-vhost.sql = "SELECT docroot FROM domains WHERE domain='?';"
  244.  
  245. #### variable usage:
  246. ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
  247. #bar = 1
  248. #var.mystring = "foo"
  249.  
  250. ## integer add
  251. #bar += 1
  252. ## string concat, with integer cast as string, result: "www.foo1.com"
  253. #server.name = "www." + mystring + var.bar + ".com"
  254. ## array merge
  255. #index-file.names = (foo + ".php") + index-file.names
  256. #index-file.names += (foo + ".php")
  257.  
  258. #### include
  259. #include server_root + "/conf/external.conf"
  260. ## same as above if you run: "lighttpd -f conf/external.conf"
  261. #include "external.conf"
  262.  
  263. $HTTP["url"] =~ "^/cgi-bin/" {
  264. cgi.assign = ( ".py" => "C:\Python27\python.exe" )
  265. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement