Advertisement
Guest User

Untitled

a guest
Dec 24th, 2010
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.01 KB | None | 0 0
  1. # Debian lighttpd configuration file
  2. #
  3.  
  4. ############ Options you really have to take care of ####################
  5.  
  6. ## modules to load
  7. # mod_access, mod_accesslog and mod_alias are loaded by default
  8. # all other module should only be loaded if neccesary
  9. # - saves some time
  10. # - saves memory
  11.  
  12. server.modules              = (
  13.             "mod_access",
  14.             "mod_alias",
  15.             "mod_accesslog",
  16.             "mod_compress",
  17. #           "mod_redirect",
  18. #           "mod_evhost",
  19. #           "mod_usertrack",
  20. #           "mod_rrdtool",
  21. #           "mod_webdav",
  22. #           "mod_expire",
  23. #           "mod_flv_streaming",
  24. #           "mod_evasive"
  25. )
  26.  
  27. ## a static document-root, for virtual-hosting take look at the
  28. ## server.virtual-* options
  29. server.document-root       = "/var/www/hello/"
  30.  
  31. ## where to upload files to, purged daily.
  32. server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
  33.  
  34. ## where to send error-messages to
  35. server.errorlog            = "/var/log/lighttpd/error.log"
  36.  
  37. ## files to check for if .../ is requested
  38. index-file.names           = ( "index.php", "index.html",
  39.                                "index.htm", "default.htm",
  40.                                "index.lighttpd.html" )
  41.  
  42.  
  43. ## Use the "Content-Type" extended attribute to obtain mime type if possible
  44. # mimetype.use-xattr = "enable"
  45.  
  46. #### accesslog module
  47. accesslog.filename         = "/var/log/lighttpd/access.log"
  48.  
  49. ## deny access the file-extensions
  50. #
  51. # ~    is for backupfiles from vi, emacs, joe, ...
  52. # .inc is often used for code includes which should in general not be part
  53. #      of the document-root
  54. url.access-deny            = ( "~", ".inc" )
  55.  
  56. ##
  57. # which extensions should not be handle via static-file transfer
  58. #
  59. # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
  60. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
  61.  
  62.  
  63. ######### Options that are good to be but not neccesary to be changed #######
  64.  
  65. ## Use ipv6 only if available. (disabled for while, check #560837)
  66. #include_shell "/usr/share/lighttpd/use-ipv6.pl"
  67.  
  68. ## bind to port (default: 80)
  69. # server.port               = 81
  70.  
  71. ## bind to localhost only (default: all interfaces)
  72. ## server.bind                = "localhost"
  73.  
  74. ## error-handler for status 404
  75. #server.error-handler-404  = "/error-handler.html"
  76. #server.error-handler-404  = "/error-handler.php"
  77.  
  78. ## to help the rc.scripts
  79. server.pid-file            = "/var/run/lighttpd.pid"
  80.  
  81. ##
  82. ## Format: <errorfile-prefix><status>.html
  83. ## -> ..../status-404.html for 'File not found'
  84. #server.errorfile-prefix    = "/var/www/"
  85.  
  86. ## virtual directory listings
  87. dir-listing.encoding        = "utf-8"
  88. server.dir-listing          = "enable"
  89.  
  90. ## send unhandled HTTP-header headers to error-log
  91. #debug.dump-unknown-headers  = "enable"
  92.  
  93. ### only root can use these options
  94. #
  95. # chroot() to directory (default: no chroot() )
  96. #server.chroot            = "/"
  97.  
  98. ## change uid to <uid> (default: don't care)
  99. server.username            = "www-data"
  100.  
  101. ## change uid to <uid> (default: don't care)
  102. server.groupname           = "www-data"
  103.  
  104. #### compress module
  105. compress.cache-dir          = "/var/cache/lighttpd/compress/"
  106. compress.filetype           = ("text/plain", "text/html", "application/x-javascript", "text/css")
  107.  
  108.  
  109. #### url handling modules (rewrite, redirect, access)
  110. # url.rewrite                 = ( "^/$"             => "/server-status" )
  111. # url.redirect                = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
  112.  
  113. #
  114. # define a pattern for the host url finding
  115. # %% => % sign
  116. # %0 => domain name + tld
  117. # %1 => tld
  118. # %2 => domain name without tld
  119. # %3 => subdomain 1 name
  120. # %4 => subdomain 2 name
  121. #
  122. # evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
  123.  
  124. #### expire module
  125. # expire.url                  = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
  126.  
  127. #### rrdtool
  128. # rrdtool.binary = "/usr/bin/rrdtool"
  129. # rrdtool.db-name = "/var/www/lighttpd.rrd"
  130.  
  131. #### variable usage:
  132. ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
  133. #bar = 1
  134. #var.mystring = "foo"
  135.  
  136. ## integer add
  137. #bar += 1
  138. ## string concat, with integer cast as string, result: "www.foo1.com"
  139. #server.name = "www." + mystring + var.bar + ".com"
  140. ## array merge
  141. #index-file.names = (foo + ".php") + index-file.names
  142. #index-file.names += (foo + ".php")
  143.  
  144.  
  145. #### external configuration files
  146. ## mimetype mapping
  147. include_shell "/usr/share/lighttpd/create-mime.assign.pl"
  148.  
  149. ## load enabled configuration files,
  150. ## read /etc/lighttpd/conf-available/README first
  151. include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
  152.  
  153. #### handle Debian Policy Manual, Section 11.5. urls
  154. ## by default allow them only from localhost
  155. ## (This must come last due to #445459)
  156. ## Note: =~ "127.0.0.1" works with ipv6 enabled, whereas == "127.0.0.1" doesn't
  157. $HTTP["remoteip"] =~ "127.0.0.1" {
  158.     alias.url += (
  159.         "/doc/" => "/usr/share/doc/",
  160.         "/images/" => "/usr/share/images/"
  161.     )
  162.     $HTTP["url"] =~ "^/doc/|^/images/" {
  163.         dir-listing.activate = "enable"
  164.     }
  165. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement