Guest User

Untitled

a guest
Jul 28th, 2011
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.71 KB | None | 0 0
  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.  
  24. cache.enable = "disable"
  25. server.stat-cache-engine = "disable"
  26.  
  27. # preconfig
  28. url.access-deny = ( "~", ".inc", ".htaccess")
  29. dir-listing.encoding = "utf-8"
  30. server.dir-listing = "disable"
  31.  
  32. # force use of the "write" backend (closes: #2401)
  33. server.network-backend = "write"
  34.  
  35. ## a static document-root, for virtual-hosting take look at the
  36. ## server.virtual-* options
  37. server.document-root = "/mnt/adatok/www/webroot"
  38.  
  39. ## where to send error-messages to
  40. server.errorlog = "/mnt/adatok/www/log/lighttpd/error.log"
  41.  
  42. ## files to check for if .../ is requested
  43. index-file.names = ( "index.html", "default.html", "index.htm", "default.htm", "index.php", "default.php" )
  44.  
  45. ## mimetype mapping
  46. mimetype.assign = (
  47. ".pdf" => "application/pdf",
  48. ".class" => "application/octet-stream",
  49. ".pac" => "application/x-ns-proxy-autoconfig",
  50. ".swf" => "application/x-shockwave-flash",
  51. ".wav" => "audio/x-wav",
  52. ".gif" => "image/gif",
  53. ".jpg" => "image/jpeg",
  54. ".jpeg" => "image/jpeg",
  55. ".png" => "image/png",
  56. ".css" => "text/css",
  57. ".html" => "text/html",
  58. ".htm" => "text/html",
  59. ".js" => "text/javascript",
  60. ".txt" => "text/plain",
  61. ".dtd" => "text/xml",
  62. ".xml" => "text/xml"
  63. )
  64.  
  65. ## Use the "Content-Type" extended attribute to obtain mime type if possible
  66. #mimetypes.use-xattr = "enable"
  67.  
  68. ## send a different Server: header
  69. ## be nice and keep it at lighttpd
  70. server.tag = "lighttpd"
  71.  
  72. $HTTP["url"] =~ "\.pdf$" {
  73. server.range-requests = "disable"
  74. }
  75.  
  76. ##
  77. # which extensions should not be handle via static-file transfer
  78. #
  79. # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
  80. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
  81.  
  82. ######### Options that are good to be but not neccesary to be changed #######
  83.  
  84. ## bind to port (default: 80)
  85. server.port = 80
  86.  
  87. ## bind to localhost (default: all interfaces)
  88. #server.bind = "localhost"
  89.  
  90. ## error-handler for status 404
  91. #server.error-handler-404 = "/error-handler.html"
  92. #server.error-handler-404 = "/error-handler.php"
  93.  
  94. ## to help the rc.scripts
  95. server.pid-file = "/var/run/lighttpd.pid"
  96.  
  97.  
  98. ###### virtual hosts
  99. ##
  100. ## If you want name-based virtual hosting add the next three settings and load
  101. ## mod_simple_vhost
  102. ##
  103. ## document-root =
  104. ## virtual-server-root + virtual-server-default-host + virtual-server-docroot or
  105. ## virtual-server-root + http-host + virtual-server-docroot
  106. ##
  107. #simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
  108. #simple-vhost.default-host = "grisu.home.kneschke.de"
  109. #simple-vhost.document-root = "/pages/"
  110.  
  111.  
  112. ##
  113. ## Format: <errorfile-prefix><status>.html
  114. ## -> ..../status-404.html for 'File not found'
  115. #server.errorfile-prefix = "/www/error-"
  116.  
  117. ## virtual directory listings
  118. #server.dir-listing = "enable"
  119.  
  120. ## send unhandled HTTP-header headers to error-log
  121. #debug.dump-unknown-headers = "enable"
  122.  
  123. ### only root can use these options
  124. #
  125. # chroot() to directory (default: no chroot() )
  126. #server.chroot = "/"
  127.  
  128. ## change uid to <uid> (default: don't care)
  129. #server.username = "nobody"
  130. #
  131. server.upload-dirs = ( "/mnt/adatok/www/tmp" )
  132.  
  133. ## change uid to <uid> (default: don't care)
  134. #server.groupname = "nobody"
  135.  
  136. #### compress module
  137. #compress.cache-dir = "/dev/null/"
  138. #compress.filetype = ("text/plain", "text/html")
  139.  
  140. #### proxy module
  141. ## read proxy.txt for more info
  142. #proxy.server = (
  143. # ".php" => (
  144. # "localhost" => (
  145. # "host" => "192.168.0.101",
  146. # "port" => 80
  147. # )
  148. # )
  149. #)
  150.  
  151. #### fastcgi module
  152. ## read fastcgi.txt for more info
  153. fastcgi.server = (
  154. ".php" => (
  155. "localhost" => (
  156. "socket" => "/tmp/php-fastcgi.socket",
  157. "bin-path" => "/usr/bin/php-cgi",
  158. "min-procs" => 1,
  159. "max-procs" => 1,
  160. "idle-timeout" => 30,
  161. "bin-envitorment" => (
  162. "PHP_FCGI_CHILDREN" => "2",
  163. "PHP_FCGI_REQUEST" => "100"
  164. ),
  165. "broken-scriptfilename" => "enable"
  166. )
  167. )
  168. )
  169.  
  170. #### CGI module
  171. $HTTP["url"] =~ "^/cgi-bin" {
  172. cgi.assign = ( "" => "/bin/sh", ".sh" => "/bin/sh" )
  173. }
  174.  
  175.  
  176. #### ssl
  177. $SERVER["socket"] == ":443" {
  178. #### SSL engine
  179. ssl.engine = "enable"
  180. ssl.pemfile = "/etc/lighttpd/server.pem"
  181. server.document-root = "/mnt/adatok/www/secured"
  182. }
  183.  
  184. #$HTTP["scheme"] == "https" {
  185. # ssl.engine = "enable"
  186. # ssl.pemfile = "/etc/lighttpd/server.pem"
  187. # server.document-root = "/mnt/adatok/www/secured"
  188. #}
  189.  
  190. #### status module
  191. status.status-url = "/status"
  192. status.config-url = "/config"
  193.  
  194. #### auth module
  195. ## read authentification.txt for more info
  196. #auth.backend = "plain"
  197. #auth.backend.plain.userfile = "lighttpd.user"
  198. #auth.backend.plain.groupfile = "lighttpd.group"
  199. #auth.require = (
  200. # "/server-status" => (
  201. # "method" => "digest",
  202. # "realm" => "download archiv",
  203. # "require" => "group=www|user=jan|host=192.168.2.10"
  204. # ),
  205. # "/server-info" => (
  206. # "method" => "digest",
  207. # "realm" => "download archiv",
  208. # "require" => "group=www|user=jan|host=192.168.2.10"
  209. # )
  210. #)
  211.  
  212. #### url handling modules (rewrite, redirect, access)
  213. #url.rewrite = ( "^/$" => "/server-status" )
  214. #url.redirect = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
  215.  
  216. #### both rewrite/redirect support back reference to regex conditional using %n
  217. #$HTTP["host"] =~ "^www\.(.*)" {
  218. # url.redirect = ( "^/(.*)" => "http://%1/$1" )
  219. #}
  220.  
  221. #### expire module
  222. #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
  223.  
  224. #### ssi
  225. #ssi.extension = ( ".shtml" )
  226.  
  227. #### setenv
  228. #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
  229. #setenv.add-response-header = ( "X-Secret-Message" => "42" )
  230.  
  231. #### variable usage:
  232. ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
  233. #bar = 1
  234. #var.mystring = "foo"
  235.  
  236. ## integer add
  237. #bar += 1
  238. ## string concat, with integer cast as string, result: "www.foo1.com"
  239. #server.name = "www." + mystring + var.bar + ".com"
  240. ## array merge
  241. #index-file.names = (foo + ".php") + index-file.names
  242. #index-file.names += (foo + ".php")
  243.  
  244. #### include
  245. #include /etc/lighttpd/lighttpd-inc.conf
  246. ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
  247. #include "lighttpd-inc.conf"
  248.  
  249. #### include_shell
  250. #include_shell "echo var.a=1"
  251. ## the above is same as:
  252. #var.a=1
  253.  
  254. #### webdav
  255. #$HTTP["url"] =~ "^/webdav($|/)" {
  256. # webdav.activate = "enable"
  257. # webdav.is-readonly = "enable"
  258. # webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"
  259. #}
  260.  
  261.  
  262. #$HTTP["host"] == "speeedfire.dyndns.info" {
  263. # server.name = "speeedfire.dyndns.info"
  264. # #documentroot
  265. # server.document-root ="/mnt/adatok/www/valami/webroot"
  266. # compress.cache-dir = "/var/cache/lighttpd/compress/" + server.name
  267. #}
Advertisement
Add Comment
Please, Sign In to add comment