Guest User

Untitled

a guest
Feb 19th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.43 KB | None | 0 0
  1. ## modules to load
  2. # at least mod_access and mod_accesslog should be loaded
  3. # all other module should only be loaded if really neccesary
  4. # - saves some time
  5. # - saves memory
  6. server.modules = (
  7. "mod_rewrite",
  8. "mod_redirect",
  9. # "mod_alias",
  10. "mod_access",
  11. # "mod_cml",
  12. # "mod_trigger_b4_dl",
  13. "mod_auth",
  14. "mod_status",
  15. "mod_setenv",
  16. "mod_fastcgi",
  17. "mod_proxy",
  18. "mod_simple_vhost",
  19. "mod_evhost",
  20. # "mod_userdir",
  21. "mod_cgi",
  22. "mod_compress",
  23. # "mod_ssi",
  24. # "mod_usertrack",
  25. # "mod_expire",
  26. # "mod_secdownload",
  27. # "mod_rrdtool",
  28. "mod_accesslog" )
  29.  
  30. ## a static document-root, for virtual-hosting take look at the
  31. ## server.virtual-* options
  32. server.document-root = "/home/langenberg/public_html"
  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. server.indexfiles = ( "index.php", "index.html",
  39. "index.htm", "default.htm" )
  40.  
  41. # mimetype mapping
  42. mimetype.assign = (
  43. ".pdf" => "application/pdf",
  44. ".sig" => "application/pgp-signature",
  45. ".spl" => "application/futuresplash",
  46. ".class" => "application/octet-stream",
  47. ".ps" => "application/postscript",
  48. ".torrent" => "application/x-bittorrent",
  49. ".dvi" => "application/x-dvi",
  50. ".gz" => "application/x-gzip",
  51. ".pac" => "application/x-ns-proxy-autoconfig",
  52. ".swf" => "application/x-shockwave-flash",
  53. ".tar.gz" => "application/x-tgz",
  54. ".tgz" => "application/x-tgz",
  55. ".tar" => "application/x-tar",
  56. ".zip" => "application/zip",
  57. ".mp3" => "audio/mpeg",
  58. ".m3u" => "audio/x-mpegurl",
  59. ".wma" => "audio/x-ms-wma",
  60. ".wax" => "audio/x-ms-wax",
  61. ".ogg" => "application/ogg",
  62. ".wav" => "audio/x-wav",
  63. ".gif" => "image/gif",
  64. ".jpg" => "image/jpeg",
  65. ".jpeg" => "image/jpeg",
  66. ".png" => "image/png",
  67. ".xbm" => "image/x-xbitmap",
  68. ".xpm" => "image/x-xpixmap",
  69. ".xwd" => "image/x-xwindowdump",
  70. ".css" => "text/css",
  71. ".html" => "text/html",
  72. ".htm" => "text/html",
  73. ".js" => "text/javascript",
  74. ".asc" => "text/plain",
  75. ".c" => "text/plain",
  76. ".cpp" => "text/plain",
  77. ".log" => "text/plain",
  78. ".conf" => "text/plain",
  79. ".text" => "text/plain",
  80. ".txt" => "text/plain",
  81. ".dtd" => "text/xml",
  82. ".xml" => "text/xml",
  83. ".mpeg" => "video/mpeg",
  84. ".mpg" => "video/mpeg",
  85. ".mov" => "video/quicktime",
  86. ".qt" => "video/quicktime",
  87. ".avi" => "video/x-msvideo",
  88. ".asf" => "video/x-ms-asf",
  89. ".asx" => "video/x-ms-asf",
  90. ".wmv" => "video/x-ms-wmv",
  91. ".bz2" => "application/x-bzip",
  92. ".tbz" => "application/x-bzip-compressed-tar",
  93. ".tar.bz2" => "application/x-bzip-compressed-tar"
  94. )
  95.  
  96. #### accesslog module
  97. accesslog.filename = "/var/log/lighttpd/access.log"
  98.  
  99. ## deny access the file-extensions
  100. #
  101. # ~ is for backupfiles from vi, emacs, joe, ...
  102. # .inc is often used for code includes which should in general not be part
  103. # of the document-root
  104. url.access-deny = ( "~", ".inc" )
  105.  
  106. $HTTP["url"] =~ "\.pdf$" {
  107. server.range-requests = "disable"
  108. }
  109.  
  110. ## Enable debugging
  111. #
  112. #debug.log-request-header = "enable"
  113. #debug.log-response-header = "enable"
  114. #debug.log-request-handling = "enable"
  115. #debug.log-file-not-found = "enable"
  116.  
  117. ## change uid to <uid> (default: don't care)
  118. server.username = "lighttpd"
  119.  
  120. ## change uid to <uid> (default: don't care)
  121. server.groupname = "lighttpd"
  122.  
  123. #### status module
  124. status.status-url = "/server-status"
  125. status.config-url = "/server-config"
  126.  
  127. auth.backend = "htpasswd"
  128. auth.backend.htpasswd.userfile = "/var/lib/trac/igu_project/htpasswd.htaccess"
  129.  
  130. ## virtual directory listings
  131. $HTTP["url"] =~ "^/file" {
  132. server.dir-listing = "enable"
  133. }
  134.  
  135. auth.require = ("/trac/login" =>
  136. ("method" => "basic",
  137. "realm" => "IGU Game Project",
  138. "require" => "valid-user"))
  139.  
  140. fastcgi.server = ("/trac" =>
  141. ("trac" =>
  142. ("socket" => "/tmp/trac-fastcgi.sock",
  143. "bin-path" => "/var/www/localhost/cgi-bin/trac.fcgi",
  144. "check-local" => "disable",
  145. "bin-environment" =>
  146. ("TRAC_ENV" => "/var/lib/trac/igu_project")
  147. )
  148. ),
  149. ".php" =>
  150. ( "localhost" =>
  151. (
  152. "socket" => "/tmp/php-fastcgi.socket",
  153. "bin-path" => "/usr/bin/php-cgi"
  154. )
  155. )
  156. )
  157.  
  158. $HTTP["url"] =~ "^/blog/" {
  159. server.document-root = "/home/langenberg/rails/typo/public/"
  160. server.indexfiles = ( "index.php", "index.html",)
  161. url.access-deny = ( "~", ".inc" )
  162. server.error-handler-404 = "blog/dispatch.fcgi"
  163.  
  164. fastcgi.server = ( ".fcgi" =>
  165. ("typo" =>
  166. ( "socket" => "/tmp/typo-fastcgi.socket",
  167. "bin-path" => "/home/langenberg/rails/typo/public/dispatch.fcgi",
  168. "bin-environment" => ("RAILS_ENV" => "production"),
  169. "min-procs" => 1,
  170. "max-procs" => 2
  171. )
  172. )
  173. )
  174. }
  175.  
  176.  
  177.  
  178. ## This for gallery2, but isn't correctly working.
  179. url.rewrite = (
  180. "^/(.*)/Rewrite.txt$" => "/$1/Works.txt",
  181. "^/gallery/v/(\?.+|\ .)?$" => "/gallery/main.php?g2_view=core.ShowItem",
  182. "^/gallery/admin[/?]*(.*)$" => "/gallery/main.php?g2_view=core.SiteAdmin&$1",
  183. "^/gallery/d/([0-9]+)-([0-9]+)/([^\/]+)(\?|\ )?(.*)$" =>
  184. "/gallery/main.php?g2_view=core.DownloadItem&g2_itemId=$1&g2_serialNumber=$2&$3",
  185. "^/gallery/v/([^?]+)/slideshow.html" =>
  186. "/gallery/main.php?g2_view=slideshow.Slideshow&g2_path=$1",
  187. "^/gallery/v/([^?]+)(\?|\ )?(.*)$" =>
  188. "/gallery/main.php?g2_view=core.ShowItem&g2_path=$1&$3",
  189. "^/gallery/c/add/([0-9]+).html" =>
  190. "/gallery/main.php?g2_view=comment.AddComment&g2_itemId=$1",
  191. "^/gallery/c/view/([0-9]+).html" =>
  192. "/gallery/main.php?g2_view=comment.ShowAllComments&g2_itemId=$1",
  193. "^/gallery/p/(.+)" =>
  194. "/gallery/main.php?g2_controller=permalinks.Redirect&g2_filename=$1"
  195. )
Add Comment
Please, Sign In to add comment