Advertisement
Gazok

lighttpd.conf

Sep 13th, 2013
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 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_fastcgi",
  17. "mod_rewrite",
  18. "mod_redirect",
  19. "mod_simple_vhost",
  20. "mod_setenv",
  21. "mod_auth",
  22. # "mod_status",
  23. # "mod_evhost",
  24. "mod_compress",
  25. # "mod_usertrack",
  26. # "mod_rrdtool",
  27. # "mod_webdav",
  28. # "mod_expire",
  29. # "mod_flv_streaming",
  30. # "mod_evasive"
  31. )
  32.  
  33. server.errorlog = "/home/vgdsoc/lighttpd/log/error.log"
  34. accesslog.filename = "/home/vgdsoc/lighttpd/log/access.log"
  35. index-file.names = ( "index.php", "index.html", "index.htm")
  36. url.access-deny = ( "~", ".inc" )
  37.  
  38. ######### Options that are good to be but not neccesary to be changed #######
  39.  
  40. ## bind to port (default: 80)
  41. server.port = 2102
  42.  
  43. ## bind to localhost only (default: all interfaces)
  44. server.bind = "localhost"
  45.  
  46. ## to help the rc.scripts
  47. server.pid-file = "/home/vgdsoc/lighttpd/run/lighttpd.pid"
  48.  
  49. ## virtual directory listings
  50. dir-listing.encoding = "utf-8"
  51. server.dir-listing = "enable"
  52.  
  53. server.username = "vgdsoc"
  54. server.groupname = "vgdsoc"
  55.  
  56.  
  57. #### compress module
  58. compress.cache-dir = "/home/vgdsoc/lighttpd/run/compress/"
  59. compress.filetype = ("text/plain", "text/html")
  60.  
  61. include_shell "/usr/share/lighttpd/create-mime.assign.pl"
  62.  
  63. server.document-root = "/home/vgdsoc/public_html/www"
  64.  
  65. # The same as rewriting everything to index.php
  66. # Actually not - this removes the query string.
  67. #server.error-handler-404 = "/index.php"
  68.  
  69. # This works:
  70. url.rewrite-once = (
  71. "public/.*" => "$0",
  72. "releases/.*" => "$0",
  73. "forums(/.*)?" => "$0",
  74. ".*\.(js|ico|gif|jpg|png|css)$" => "$0",
  75. ".*\?(.*)" => "/index.php?$1",
  76. "" => "/index.php"
  77. )
  78.  
  79. fastcgi.server = (
  80. ".php" => ((
  81. "bin-path" => "/usr/bin/php-cgi -d memory_limit=128M -d magic_quotes_gpc=off",
  82. "check-local" => "disable",
  83. "socket" => "/home/vgdsoc/lighttpd/run/fastcgi.socket",
  84. "min-procs" => 1,
  85. "max-procs" => 1,
  86. "idle-timeout" => 20,
  87. "bin-environment" => (
  88. "PHP_FCGI_CHILDREN" => "4",
  89. "PHP_FCGI_MAX_REQUESTS" => "5000"
  90. ),
  91.  
  92. ))
  93. )
  94.  
  95. # New subdomain settings
  96. $HTTP["host"] =~ "test.domain.co.uk" {
  97. server.document-root = "/home/vgdsoc/public_html/test"
  98. }
  99. $HTTP["host"] =~ "old.domain.co.uk" {
  100. server.document-root = "/home/vgdsoc/public_html/old"
  101. }
  102.  
  103. # The old testing site settings
  104. #$HTTP["host"] =~ "test.domain.co.uk" {
  105. # server.document-root = "/home/vgdsoc/public_html/test"
  106. # auth.backend = "htdigest"
  107. # auth.backend.htdigest.userfile = "/home/vgdsoc/lighttpd/passwords"
  108. # auth.debug = 2
  109.  
  110. # auth.require = ( "/" =>
  111. # (
  112. # "method" => "digest",
  113. # "realm" => "Test site",
  114. # "require" => "valid-user"
  115. # )
  116. # )
  117. #}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement