lighttpd.conf 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. server.modules = (
  2. "mod_access",
  3. "mod_cgi",
  4. "mod_compress",
  5. "mod_accesslog",
  6. "mod_rewrite",
  7. "mod_alias",
  8. "mod_auth",
  9. "mod_setenv",
  10. # "mod_status",
  11. # "mod_alias",
  12. # "mod_redirect",
  13. # "mod_debug"
  14. )
  15. server.document-root = "/www/htdocs"
  16. #server.document-root = "/home/danja/www/merz/"
  17. server.upload-dirs = ( "/tmp" )
  18. server.errorlog = "/tmp/lighttpd-error.log"
  19. accesslog.filename = "/tmp/lighttpd-access.log"
  20. server.pid-file = "/var/run/lighttpd.pid"
  21. server.username = "httpd"
  22. server.groupname = "nogroup"
  23. server.port = 80
  24. ## defines var.superglueVersion from /etc/superglue_version
  25. include_shell "/etc/lighttpd/vars.sh"
  26. setenv.add-response-header = ( "X-SuperGlue-Version" => var.superglueVersion )
  27. debug.log-request-handling = "enable"
  28. #debug.log-request-header = "enable"
  29. #debug.log-file-not-found = "enable"
  30. #debug.log-request-header-on-error = "enable"
  31. #debug.log-response-header = "enable"
  32. #debug.log-condition-handling = "enable"
  33. auth.backend = "htdigest"
  34. auth.backend.htdigest.userfile = "/www/lib/admin/htpasswd"
  35. #auth.debug = 2
  36. #setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*" )
  37. compress.cache-dir = "/tmp/lighttpd/compress"
  38. compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
  39. index-file.names = ( "index.html", "default.html" )
  40. #cgi.assign = ( ".sh" => "/bin/bash" )
  41. cgi.assign = ( ".cgi" => "" )
  42. url.access-deny = ( "~", ".inc", ".htaccess", ".htpasswd", "htpasswd")
  43. $HTTP["request-method"] == "GET" {
  44. url.rewrite = ( "^/resources/(.*)$" => "resources/$1",
  45. "^/devTools/(.*)$" => "devTools/$1",
  46. "^/templates/(.*)$" => "templates/$1",
  47. "^/admin/(.*)$" => "admin/admin.cgi" )
  48. alias.url = ( "/resources" => "/www/lib/resources",
  49. "/devTools" => "/www/lib/devTools",
  50. "/templates" => "/www/lib/templates",
  51. "/admin" => "/www/lib/admin" )
  52. }
  53. $HTTP["request-method"] == "POST" {
  54. url.rewrite = ( "^(/(?!admin).*)" => "post.cgi",
  55. "^(/(admin).*)" => "admin.cgi"
  56. )
  57. $HTTP["url"] =~ "^/post.cgi" {
  58. server.document-root = "/www/lib/cgi"
  59. }
  60. $HTTP["url"] =~ "^/admin.cgi" {
  61. server.document-root = "/www/lib/admin"
  62. }
  63. }
  64. #auth.require = (
  65. # "/post.sh" => ( "method" => "digest",
  66. # "realm" => "superglue",
  67. # "require" => "valid-user" ),
  68. # "/admin" => ( "method" => "digest",
  69. # "realm" => "superglue",
  70. # "require" => "valid-user" )
  71. # )
  72. include "/etc/lighttpd/mime.conf"