lighttpd.conf 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. server.modules = (
  2. "mod_alias",
  3. "mod_redirect",
  4. "mod_cgi"
  5. )
  6. server.document-root = "/www/htdocs"
  7. server.upload-dirs = ( "/www/tmp" )
  8. server.errorlog = "/www/log/error.log"
  9. server.pid-file = "/var/run/lighttpd.pid"
  10. server.username = "httpd"
  11. server.groupname = "nogroup"
  12. server.port = 80
  13. index-file.names = (
  14. "index.html",
  15. "default.html"
  16. )
  17. $SERVER["socket"] == ":80" {
  18. $HTTP["host"] =~ "(.*)" {
  19. url.redirect = ( "^(?!/systemupdate|/resources).*$" => "http://%1/systemupdate" )
  20. }
  21. }
  22. cgi.assign = (
  23. ".sh" => "/bin/bash",
  24. ".cgi" => "",
  25. )
  26. #url.access-deny = ( "~", ".inc", ".htaccess", ".htpasswd", "htpasswd", "/tmp/" )
  27. $HTTP["request-method"] == "GET" {
  28. alias.url = (
  29. "/resources" => "/opt/lib/resources",
  30. "/systemupdate" => "/opt/lib/cgi/rescue.cgi",
  31. )
  32. }
  33. $HTTP["request-method"] == "POST" {
  34. alias.url = (
  35. "/systemupdate" => "/opt/lib/cgi/rescue.cgi",
  36. )
  37. }
  38. ## reads optional conf files
  39. include "/etc/lighttpd/mime.conf"