Advertisement
Guest User

Untitled

a guest
May 6th, 2017
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.90 KB | None | 0 0
  1. # lighttpd configuration file
  2. #
  3. # use it as a base for lighttpd 1.0.0 and above
  4. #
  5. # $Id: lighttpd.conf,v 1.7 2004/11/03 22:26:05 weigon Exp $
  6.  
  7. ############ Options you really have to take care of ####################
  8.  
  9. ## modules to load
  10. # at least mod_access and mod_accesslog should be loaded
  11. # all other module should only be loaded if really neccesary
  12. # - saves some time
  13. # - saves memory
  14. server.modules = (
  15. "mod_rewrite",
  16. # "mod_redirect",
  17. # "mod_alias",
  18. "mod_access",
  19. # "mod_cml",
  20. # "mod_trigger_b4_dl",
  21. # "mod_auth",
  22. # "mod_status",
  23. # "mod_setenv",
  24. # "mod_fastcgi",
  25. # "mod_proxy",
  26. # "mod_simple_vhost",
  27. # "mod_evhost",
  28. # "mod_userdir",
  29. "mod_cgi",
  30. # "mod_compress",
  31. # "mod_ssi",
  32. # "mod_usertrack",
  33. # "mod_expire",
  34. # "mod_secdownload",
  35. # "mod_rrdtool",
  36. # "mod_webdav",
  37. "mod_accesslog" )
  38.  
  39. ## a static document-root, for virtual-hosting take look at the
  40. ## server.virtual-* options
  41. server.document-root = "/www/pages/"
  42.  
  43. $SERVER["socket"] == ":3332" {
  44. server.document-root = "/www/BaseApiRouterApp/"
  45. }
  46.  
  47. $SERVER["socket"] == ":3333" {
  48. server.document-root = "/www/WheelWebApp/"
  49. }
  50. $SERVER["socket"] == ":3334" {
  51. server.document-root = "/www/EndpointApp/"
  52. }
  53.  
  54. ## where to send error-messages to
  55. server.errorlog = "/www/logs/lighttpd.error.log"
  56.  
  57. # files to check for if .../ is requested
  58. index-file.names = ( "index.php", "index.html",
  59. "index.htm", "default.htm" )
  60.  
  61. ## set the event-handler (read the performance section in the manual)
  62. # server.event-handler = "freebsd-kqueue" # needed on OS X
  63.  
  64. # mimetype mapping
  65. mimetype.assign = (
  66. ".pdf" => "application/pdf",
  67. ".sig" => "application/pgp-signature",
  68. ".spl" => "application/futuresplash",
  69. ".class" => "application/octet-stream",
  70. ".ps" => "application/postscript",
  71. ".torrent" => "application/x-bittorrent",
  72. ".dvi" => "application/x-dvi",
  73. ".gz" => "application/x-gzip",
  74. ".pac" => "application/x-ns-proxy-autoconfig",
  75. ".swf" => "application/x-shockwave-flash",
  76. ".tar.gz" => "application/x-tgz",
  77. ".tgz" => "application/x-tgz",
  78. ".tar" => "application/x-tar",
  79. ".zip" => "application/zip",
  80. ".mp3" => "audio/mpeg",
  81. ".m3u" => "audio/x-mpegurl",
  82. ".wma" => "audio/x-ms-wma",
  83. ".wax" => "audio/x-ms-wax",
  84. ".ogg" => "application/ogg",
  85. ".wav" => "audio/x-wav",
  86. ".gif" => "image/gif",
  87. ".jpg" => "image/jpeg",
  88. ".jpeg" => "image/jpeg",
  89. ".png" => "image/png",
  90. ".xbm" => "image/x-xbitmap",
  91. ".xpm" => "image/x-xpixmap",
  92. ".xwd" => "image/x-xwindowdump",
  93. ".css" => "text/css",
  94. ".html" => "text/html",
  95. ".htm" => "text/html",
  96. ".js" => "text/javascript",
  97. ".asc" => "text/plain",
  98. ".c" => "text/plain",
  99. ".cpp" => "text/plain",
  100. ".log" => "text/plain",
  101. ".conf" => "text/plain",
  102. ".text" => "text/plain",
  103. ".txt" => "text/plain",
  104. ".dtd" => "text/xml",
  105. ".xml" => "text/xml",
  106. ".mpeg" => "video/mpeg",
  107. ".mpg" => "video/mpeg",
  108. ".mov" => "video/quicktime",
  109. ".qt" => "video/quicktime",
  110. ".avi" => "video/x-msvideo",
  111. ".asf" => "video/x-ms-asf",
  112. ".asx" => "video/x-ms-asf",
  113. ".wmv" => "video/x-ms-wmv",
  114. ".bz2" => "application/x-bzip",
  115. ".tbz" => "application/x-bzip-compressed-tar",
  116. ".tar.bz2" => "application/x-bzip-compressed-tar"
  117. )
  118.  
  119. # Use the "Content-Type" extended attribute to obtain mime type if possible
  120. #mimetype.use-xattr = "enable"
  121.  
  122.  
  123. ## send a different Server: header
  124. ## be nice and keep it at lighttpd
  125. # server.tag = "lighttpd"
  126.  
  127. #### accesslog module
  128. #accesslog.filename = "/www/logs/access.log"
  129. ##debug.log-request-handling = "disable"
  130.  
  131.  
  132.  
  133.  
  134. ## deny access the file-extensions
  135. #
  136. # ~ is for backupfiles from vi, emacs, joe, ...
  137. # .inc is often used for code includes which should in general not be part
  138. # of the document-root
  139. url.access-deny = ( "~", ".inc" )
  140.  
  141. $HTTP["url"] =~ "\.pdf$" {
  142. server.range-requests = "disable"
  143. }
  144.  
  145. ##
  146. # which extensions should not be handle via static-file transfer
  147. #
  148. # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
  149. static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
  150.  
  151. ######### Options that are good to be but not neccesary to be changed #######
  152.  
  153. ## bind to port (default: 80)
  154. #server.port = 81
  155.  
  156. ## bind to localhost (default: all interfaces)
  157. #server.bind = "grisu.home.kneschke.de"
  158.  
  159. ## error-handler for status 404
  160. #server.error-handler-404 = "/index.php"
  161. #server.error-handler-404 = "/error-handler.php"
  162.  
  163. ## to help the rc.scripts
  164. #server.pid-file = "/var/run/lighttpd.pid"
  165.  
  166.  
  167. ###### virtual hosts
  168. ##
  169. ## If you want name-based virtual hosting add the next three settings and load
  170. ## mod_simple_vhost
  171. ##
  172. ## document-root =
  173. ## virtual-server-root + virtual-server-default-host + virtual-server-docroot
  174. ## or
  175. ## virtual-server-root + http-host + virtual-server-docroot
  176. ##
  177. #simple-vhost.server-root = "/home/weigon/wwwroot/servers/"
  178. #simple-vhost.default-host = "grisu.home.kneschke.de"
  179. #simple-vhost.document-root = "/pages/"
  180.  
  181.  
  182. ##
  183. ## Format: <errorfile-prefix><status-code>.html
  184. ## -> ..../status-404.html for 'File not found'
  185. #server.errorfile-prefix = "/home/weigon/projects/lighttpd/doc/status-"
  186.  
  187. ## virtual directory listings
  188. #dir-listing.activate = "enable"
  189.  
  190. ## enable debugging
  191. #debug.log-request-header = "enable"
  192. #debug.log-response-header = "enable"
  193. #debug.log-request-handling = "enable"
  194. #debug.log-file-not-found = "enable"
  195.  
  196. ### only root can use these options
  197. #
  198. # chroot() to directory (default: no chroot() )
  199. #server.chroot = "/"
  200.  
  201. ## change uid to <uid> (default: don't care)
  202. #server.username = "wwwrun"
  203.  
  204. ## change uid to <uid> (default: don't care)
  205. #server.groupname = "wwwrun"
  206.  
  207. #### compress module
  208. #compress.cache-dir = "/tmp/lighttpd/cache/compress/"
  209. #compress.filetype = ("text/plain", "text/html")
  210.  
  211. #### proxy module
  212. ## read proxy.txt for more info
  213. #proxy.server = ( ".php" =>
  214. # ( "localhost" =>
  215. # (
  216. # "host" => "192.168.0.101",
  217. # "port" => 80
  218. # )
  219. # )
  220. # )
  221.  
  222. #### fastcgi module
  223. ## read fastcgi.txt for more info
  224. ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
  225. #fastcgi.server = ( ".php" =>
  226. # ( "localhost" =>
  227. # (
  228. # "socket" => "/tmp/php-fastcgi.socket",
  229. # "bin-path" => "/usr/bin/php"
  230. # )
  231. # )
  232. # )
  233. #
  234.  
  235. #### CGI module
  236. cgi.assign = ( ".pl" => "/usr/bin/perl",
  237. ".cgi" => "/usr/bin/perl",
  238. ".php" => "/usr/bin/php" )
  239.  
  240.  
  241. #### SSL engine
  242. #ssl.engine = "enable"
  243. #ssl.pemfile = "server.pem"
  244.  
  245. #### status module
  246. #status.status-url = "/server-status"
  247. #status.config-url = "/server-config"
  248.  
  249. #### auth module
  250. ## read authentication.txt for more info
  251. #auth.backend = "plain"
  252. #auth.backend.plain.userfile = "lighttpd.user"
  253. #auth.backend.plain.groupfile = "lighttpd.group"
  254.  
  255. #auth.backend.ldap.hostname = "localhost"
  256. #auth.backend.ldap.base-dn = "dc=my-domain,dc=com"
  257. #auth.backend.ldap.filter = "(uid=$)"
  258.  
  259. #auth.require = ( "/server-status" =>
  260. # (
  261. # "method" => "digest",
  262. # "realm" => "download archiv",
  263. # "require" => "user=jan"
  264. # ),
  265. # "/server-config" =>
  266. # (
  267. # "method" => "digest",
  268. # "realm" => "download archiv",
  269. # "require" => "valid-user"
  270. # )
  271. # )
  272.  
  273. #### url handling modules (rewrite, redirect, access)
  274. url.rewrite-once = (
  275. "/(.*)\.(.*)" => "$0",
  276. "/(css|files|img|js|stats)/" => "$0",
  277. "^/([^.]+)$" => "/index.php/$1"
  278. )
  279.  
  280. #### both rewrite/redirect support back reference to regex conditional using %n
  281. #$HTTP["host"] =~ "^www\.(.*)" {
  282. # url.redirect = ( "^/(.*)" => "http://%1/$1" )
  283. #}
  284.  
  285. #
  286. # define a pattern for the host url finding
  287. # %% => % sign
  288. # %0 => domain name + tld
  289. # %1 => tld
  290. # %2 => domain name without tld
  291. # %3 => subdomain 1 name
  292. # %4 => subdomain 2 name
  293. #
  294. #evhost.path-pattern = "/home/storage/dev/www/%3/htdocs/"
  295.  
  296. #### expire module
  297. #expire.url = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
  298.  
  299. #### ssi
  300. #ssi.extension = ( ".shtml" )
  301.  
  302. #### rrdtool
  303. #rrdtool.binary = "/usr/bin/rrdtool"
  304. #rrdtool.db-name = "/var/www/lighttpd.rrd"
  305.  
  306. #### setenv
  307. #setenv.add-request-header = ( "TRAV_ENV" => "mysql://user@host/db" )
  308. #setenv.add-response-header = ( "X-Secret-Message" => "42" )
  309.  
  310. ## for mod_trigger_b4_dl
  311. # trigger-before-download.gdbm-filename = "/home/weigon/testbase/trigger.db"
  312. # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
  313. # trigger-before-download.trigger-url = "^/trigger/"
  314. # trigger-before-download.download-url = "^/download/"
  315. # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
  316. # trigger-before-download.trigger-timeout = 10
  317.  
  318. ## for mod_cml
  319. ## don't forget to add index.cml to server.indexfiles
  320. # cml.extension = ".cml"
  321. # cml.memcache-hosts = ( "127.0.0.1:11211" )
  322.  
  323. #### variable usage:
  324. ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
  325. #bar = 1
  326. #var.mystring = "foo"
  327.  
  328. ## integer add
  329. #bar += 1
  330. ## string concat, with integer cast as string, result: "www.foo1.com"
  331. #server.name = "www." + mystring + var.bar + ".com"
  332. ## array merge
  333. #index-file.names = (foo + ".php") + index-file.names
  334. #index-file.names += (foo + ".php")
  335.  
  336. #### include
  337. #include /etc/lighttpd/lighttpd-inc.conf
  338. ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
  339. #include "lighttpd-inc.conf"
  340.  
  341. #### include_shell
  342. #include_shell "echo var.a=1"
  343. ## the above is same as:
  344. #var.a=1
  345.  
  346. # include other config file fragments from lighttpd.d subdir
  347. include_shell "find /etc/lighttpd.d -maxdepth 1 -name '*.conf' -exec cat {} \;"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement