Guest User

Untitled

a guest
May 26th, 2021
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.28 KB | None | 0 0
  1. server.modules = (
  2. "mod_access",
  3. "mod_auth",
  4. "mod_rewrite",
  5. "mod_redirect",
  6. "mod_alias",
  7. "mod_cgi",
  8. "mod_ssi",
  9. "mod_compress",
  10. "mod_expire",
  11.  
  12. )
  13.  
  14. #auth.debug = 2 #deprecated in later versions of lighttpd
  15. auth.backend = "plain"
  16. auth.backend.plain.userfile = "/usr/xxxx/.lighttpdpassword"
  17.  
  18. server.document-root = "/var/www"
  19. server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
  20. server.errorlog = "/var/log/lighttpd/error.log"
  21. server.pid-file = "/var/run/lighttpd.pid"
  22. server.username = "www-data"
  23. server.groupname = "www-data"
  24. server.port = 80
  25.  
  26. $HTTP["url"] =~ "^/cgi-bin/" {
  27. cgi.assign = ( "" => "" )
  28. # cgi.assign = ( ".pl" => "/usr/bin/perl" )
  29. }
  30.  
  31. alias.url = ("/cgi-bin/" => "/usr/lib/cgi-bin/")
  32.  
  33. url.rewrite-once = (
  34. "^/xxxx.htm(?:\?(.*))?" => "/cgi-bin/xxxx.cgi?$1",
  35. "^/xxxx.htm(?:\?(.*))?" => "/cgi-bin/xxxx.cgi?$1"
  36. )
  37.  
  38. $HTTP["url"] !~ "^/login.shtml|/xxxx.js" {
  39. auth.require = (
  40. "/xxxx/" =>
  41. (
  42. "method" => "basic",
  43. "realm" => "xxxx",
  44. "require" => "user=xxxx|user=xxxx"
  45. ),
  46. "/" =>
  47. (
  48. "method" => "basic",
  49. "realm" => "xxxx",
  50. "require" => "valid-user"
  51. ),
  52. "/cgi-bin/admin" =>
  53. (
  54. "method" => "basic",
  55. "realm" => "xxxx",
  56. "require" => "user=xxxx|user=xxxx"
  57. ),
  58. "/cgi-bin/" =>
  59. (
  60. "method" => "basic",
  61. "realm" => "xxxx",
  62. "require" => "valid-user"
  63. )
  64. )
  65. }
  66.  
  67.  
  68. expire.url = ( "" => "access 1 seconds" )
  69. index-file.names = ( "index.php", "index.shtml", "index.html", "index.lighttpd.html" )
  70. url.access-deny = ( "~", ".inc" )
  71. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
  72. ssi.extension = (".shtml")
  73.  
  74. compress.cache-dir = "/var/cache/lighttpd/compress/"
  75. compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" )
  76.  
  77. ## MimeType handling
  78. ## -------------------
  79. ##
  80. ## Use the "Content-Type" extended attribute to obtain mime type if
  81. ## possible
  82. ##
  83. mimetype.use-xattr = "disable"
  84.  
  85. ##
  86. ## mimetype mapping
  87. ##
  88. mimetype.assign = (
  89. ".pdf" => "application/pdf",
  90. ".sig" => "application/pgp-signature",
  91. ".spl" => "application/futuresplash",
  92. ".class" => "application/octet-stream",
  93. ".ps" => "application/postscript",
  94. ".torrent" => "application/x-bittorrent",
  95. ".dvi" => "application/x-dvi",
  96. ".gz" => "application/x-gzip",
  97. ".pac" => "application/x-ns-proxy-autoconfig",
  98. ".swf" => "application/x-shockwave-flash",
  99. ".tar.gz" => "application/x-tgz",
  100. ".tgz" => "application/x-tgz",
  101. ".tar" => "application/x-tar",
  102. ".zip" => "application/zip",
  103. ".mp3" => "audio/mpeg",
  104. ".m3u" => "audio/x-mpegurl",
  105. ".wma" => "audio/x-ms-wma",
  106. ".wax" => "audio/x-ms-wax",
  107. ".ogg" => "application/ogg",
  108. ".wav" => "audio/x-wav",
  109. ".gif" => "image/gif",
  110. ".jpg" => "image/jpeg",
  111. ".jpeg" => "image/jpeg",
  112. ".png" => "image/png",
  113. ".xbm" => "image/x-xbitmap",
  114. ".xpm" => "image/x-xpixmap",
  115. ".xwd" => "image/x-xwindowdump",
  116. ".css" => "text/css",
  117. ".html" => "text/html",
  118. ".htm" => "text/html",
  119. ".js" => "text/javascript",
  120. ".asc" => "text/plain",
  121. ".c" => "text/plain",
  122. ".cpp" => "text/plain",
  123. ".log" => "text/plain",
  124. ".conf" => "text/plain",
  125. ".text" => "text/plain",
  126. ".txt" => "text/plain",
  127. ".spec" => "text/plain",
  128. ".dtd" => "text/xml",
  129. ".xml" => "text/xml",
  130. ".mpeg" => "video/mpeg",
  131. ".mpg" => "video/mpeg",
  132. ".mov" => "video/quicktime",
  133. ".qt" => "video/quicktime",
  134. ".avi" => "video/x-msvideo",
  135. ".asf" => "video/x-ms-asf",
  136. ".asx" => "video/x-ms-asf",
  137. ".wmv" => "video/x-ms-wmv",
  138. ".bz2" => "application/x-bzip",
  139. ".tbz" => "application/x-bzip-compressed-tar",
  140. ".tar.bz2" => "application/x-bzip-compressed-tar",
  141. ".odt" => "application/vnd.oasis.opendocument.text",
  142. ".ods" => "application/vnd.oasis.opendocument.spreadsheet",
  143. ".odp" => "application/vnd.oasis.opendocument.presentation",
  144. ".odg" => "application/vnd.oasis.opendocument.graphics",
  145. ".odc" => "application/vnd.oasis.opendocument.chart",
  146. ".odf" => "application/vnd.oasis.opendocument.formula",
  147. ".odi" => "application/vnd.oasis.opendocument.image",
  148. ".odm" => "application/vnd.oasis.opendocument.text-master",
  149. ".ott" => "application/vnd.oasis.opendocument.text-template",
  150. ".ots" => "application/vnd.oasis.opendocument.spreadsheet-template",
  151. ".otp" => "application/vnd.oasis.opendocument.presentation-template",
  152. ".otg" => "application/vnd.oasis.opendocument.graphics-template",
  153. ".otc" => "application/vnd.oasis.opendocument.chart-template",
  154. ".otf" => "application/vnd.oasis.opendocument.formula-template",
  155. ".oti" => "application/vnd.oasis.opendocument.image-template",
  156. ".oth" => "application/vnd.oasis.opendocument.text-web",
  157.  
  158. # make the default mime type application/octet-stream.
  159. "" => "application/octet-stream",
  160. )
  161.  
  162. # default listening port for IPv6 falls back to the IPv4 port
  163. include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
  164. #include_shell "/usr/share/lighttpd/create-mime.assign.pl"
  165. #include_shell "/usr/share/lighttpd/include-conf-enabled.pl" #deprecated? use following line? didn't make any difference
  166. include "/etc/lighttpd/conf-enabled/*.conf"
  167. #include "/etc/lighttpd/conf-available/*.conf" #found in an online post but didn't make any difference
  168.  
  169.  
Add Comment
Please, Sign In to add comment