Advertisement
Guest User

Untitled

a guest
Dec 11th, 2011
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 3.39 KB | None | 0 0
  1. server.modules              = (
  2.             "mod_access",
  3.             "mod_alias",
  4.             "mod_accesslog",
  5.             "mod_compress",
  6.             "mod_scgi",
  7.             "mod_fastcgi",
  8. #            "mod_auth",
  9. )
  10.  
  11. server.document-root       = "/var/www/"
  12.  
  13. server.errorlog            = "/var/log/lighttpd/error.log"
  14.  
  15. index-file.names           = ( "index.php", "index.html",
  16.                                "index.htm", "default.htm" )
  17.  
  18.  
  19. accesslog.filename         = "/var/log/lighttpd/access.log"
  20.  
  21. url.access-deny            = ( "~", ".inc",".db", ".tpl.php", ".cls.php" )
  22.  
  23. server.pid-file            = "/var/run/lighttpd.pid"
  24.  
  25. dir-listing.encoding        = "utf-8"
  26. server.dir-listing          = "enable"
  27.  
  28. server.username            = "www-data"
  29.  
  30. server.groupname           = "www-data"
  31.  
  32. server.port = 80
  33.  
  34. $HTTP["remoteip"] =~ "127.0.0.1" {
  35.         alias.url += (
  36.                 "/doc/" => "/usr/share/doc/",
  37.                 "/images/" => "/usr/share/images/"
  38.         )
  39.         $HTTP["url"] =~ "^/doc/|^/images/" {
  40.                 dir-listing.activate = "enable"
  41.         }
  42. }
  43.  
  44. $HTTP["host"] == "127.0.0.1" {   #change your server IP
  45. server.document-root = "/var/www/"
  46. server.errorlog = "/var/log/lighttpd/error.log"
  47. accesslog.filename = "/var/log/lighttpd/access.log"
  48. server.error-handler-404 = "/error-handler.php"
  49. }
  50.  
  51. include_shell "/usr/share/lighttpd/create-mime.assign.pl"
  52. include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
  53.  
  54. #fastcgi (low lighttpd version?)can let fastcgi script to move to /etc/lighttpd/conf-available/10-fastcgi-php5.conf
  55. fastcgi.server = (
  56. #fastcgi another script slection
  57. #                    ".php" => ((
  58. #                    "bin-path" => "/usr/bin/php-cgi",
  59. #                   "socket" => "/tmp/php.socket"
  60. #              ))
  61.                     ".php" =>
  62.         ((
  63.                     "bin-path" => "/usr/bin/php-cgi",
  64.                     "socket" => "/tmp/php.socket",
  65.                     "max-procs" => 2,
  66.                     "idle-timeout" => 20,
  67.                     "bin-environment" =>
  68.                         (
  69.                             "PHP_FCGI_CHILDREN" => "4",
  70.                             "PHP_FCGI_MAX_REQUESTS" => "10000"
  71.                         ),
  72.                     "bin-copy-environment" =>
  73.                         (
  74.                             "PATH", "SHELL", "USER"
  75.                         ),
  76.                     "broken-scriptfilename" => "enable"
  77.         ))
  78.  
  79. )
  80.  
  81. scgi.server =(
  82. "/RPC2" => # RT_DIR
  83. ( "127.0.0.1" =>
  84. (
  85.  
  86. #scgi port:wtorrent,rutorrent
  87.         "host" => "127.0.0.1", # Ip where rtorrent is listening
  88.         "port" => 5000, # Port specified in .rtorrent.rc
  89.         "check-local" => "disable"
  90. #scgi socket:rutorrent
  91.         #"socket" => "/tmp/rpc.socket",
  92.         #"check-local" => "disable",
  93.         #"disable-time" => 0, # don't disable scgi if connection fails
  94. )
  95. )
  96. )
  97.  
  98. #rutorrent:password
  99. server.modules += ( "mod_auth" )
  100. auth.backend = "htdigest"
  101. auth.backend.htdigest.userfile = "/etc/lighttpd/.auth"
  102. auth.debug = 2
  103. auth.require = ( "/rutorrent/" =>
  104. (
  105. "method" => "digest",
  106. "realm" => "Authorized users only",
  107. "require" => "valid-user"
  108. )
  109. )
  110.  
  111. #rutorrent:ssl
  112. $SERVER["socket"] == ":443" {
  113. ssl.engine = "enable"
  114. ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem"
  115. }
  116.                                                          
  117.                                                          
  118.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement