Advertisement
Guest User

nubela

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