Guest User

Untitled

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