sanchomuzax

Lighttpd.conf (Debian 7.0, Raspberry Pi)

Jun 3rd, 2013
719
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. server.modules = (
  2.         "mod_access",
  3.         "mod_alias",
  4.         "mod_compress",
  5.         "mod_redirect",
  6.         "mod_rewrite",
  7.         "mod_fastcgi",
  8.         "mod_auth",
  9.         "mod_status",
  10. )
  11.  
  12. server.document-root        = "/var/www"
  13. server.upload-dirs          = ( "/var/cache/lighttpd/uploads" )
  14. server.errorlog             = "/var/log/lighttpd/error.log"
  15. server.pid-file             = "/var/run/lighttpd.pid"
  16. server.username             = "www-data"
  17. server.groupname            = "www-data"
  18. server.port                 = 80
  19. server.name                 = "********"
  20.  
  21. status.status-url           = "/server-status"
  22.  
  23. index-file.names            = ( "index.php", "index.html", "index.lighttpd.html" )
  24. url.access-deny             = ( "~", ".inc", ".htaccess" )
  25. static-file.exclude-extensions = ( ".php", ".pl", ".cgi", ".fcgi" )
  26.  
  27. server.dir-listing          = "disable"
  28.  
  29. compress.cache-dir          = "/var/cache/lighttpd/compress/"
  30. compress.filetype           = ( "application/javascript", "text/css", "text/html", "text/plain" )
  31.  
  32. #server.modules += ( "mod_cgi" ) #kiszedve, mert hibat ad, ha ez bentmarad
  33. cgi.assign = ( ".sh" => "/bin/sh" )
  34.  
  35. # for browsers
  36. $HTTP["useragent"] =~ "(MSIE [7-9]|Mozilla/[5-9])" {
  37.         compress.filetype  = ( "text/plain", "text/html", "text/css", "text/xml", "text/javascript", "application/x-javascript" )
  38. }
  39. $HTTP["useragent"] !~ "(MSIE [7-9]|Mozilla/[5-9])" {
  40.         compress.filetype  = ( "text/plain", "text/html" )
  41. }
  42.  
  43. # default listening port for IPv6 falls back to the IPv4 port
  44. include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port
  45. include_shell "/usr/share/lighttpd/create-mime.assign.pl"
  46. include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
  47.  
  48. # url rewrite for selfoss
  49. url.rewrite-once += (
  50.  "^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico",
  51.  "^/selfoss/favicons/(.*)$" => "/selfoss/data/favicons/$1",
  52.  "^/selfoss/thumbnails/(.*)$" => "/selfoss/data/thumbnails/$1",
  53.  "^/selfoss/(.*.(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))$" => "/selfoss/public/$1",
  54.  "^/selfoss/index.php(.*)$" => "$0",
  55.  "^/selfoss/([^\?]+)(\?(.*))?" => "/selfoss/index.php?$3",
  56.  "^/selfoss/public/" => "$0",
  57.  "^/selfoss/(.*)" => "/selfoss/index.php?$1"
  58.  )
  59. # php enable, required for tt-rss
  60. fastcgi.server = ( ".php" => ((
  61.                      "bin-path" => "/usr/bin/php-cgi",
  62.                      "socket" => "/tmp/php.socket"
  63.                  )))
  64. include "phpmyadmin.conf"
  65.  
  66. # for munin
  67. alias.url += ( "/munin-static" => "/etc/munin/static" )
  68. alias.url += ( "/munin"        => "/var/cache/munin/www/" )
  69.  
  70. fastcgi.server += ("/munin-cgi/munin-cgi-graph" =>
  71.                    (( "socket"      => "/var/run/lighttpd/munin-cgi-graph.sock",
  72.                       "bin-path"    => "/usr/lib/munin/cgi/munin-cgi-graph",
  73.                       "check-local" => "disable",
  74.                    )),
  75.                   "/munin-cgi/munin-cgi-html" =>
  76.                    (( "socket"      => "/var/run/lighttpd/munin-cgi-html.sock",
  77.                       "bin-path"    => "/usr/lib/munin/cgi/munin-cgi-html",
  78.                       "check-local" => "disable",
  79.                    ))
  80.                  )
  81.  
  82. url.rewrite-repeat += (
  83.                    "^/munin/((?!static/).*\.png$)" => "/munin-cgi/munin-cgi-graph/$1",
  84.                    "^/munin/((?!static/).*\.html$)" => "/munin-cgi/munin-cgi-html/$1"
  85.                    )
  86.  
  87. auth.debug = 2
  88. auth.backend = "plain"
  89. auth.backend.plain.userfile = "/etc/lighttpd/.lighttpdpassword"
  90. accesslog.filename = "/var/log/lighttpd/access.log"
  91.  
  92. $HTTP["url"] =~ "^/phpmyadmin|^/selfoss|^/cups|^/cam" {
  93.   auth.require = ( "" =>
  94.                    (
  95.                      "method" => "basic",
  96.                      "realm" => "Authorization please",
  97.                      "require" => "valid-user"
  98.                    )
  99.                  )
  100. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×