Advertisement
Guest User

junksmi

a guest
Dec 23rd, 2008
359
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 3.68 KB | None | 0 0
  1. # lighttpd configuration file
  2. #
  3. # use it as a base for lighttpd 1.0.0 and above
  4. #
  5. # $Id: lighttpd.conf 8860 2008-08-05 10:56:16Z engy $
  6.  
  7. ############ Options you really have to take care of ####################
  8.  
  9. ## modules to load
  10. server.modules              = (
  11.                                "mod_rewrite",
  12.                                "mod_redirect",
  13. #                               "mod_alias",
  14.                                 "mod_access",
  15. #                               "mod_cml",
  16. #                               "mod_trigger_b4_dl",
  17.                                 "mod_auth",
  18.                                 "mod_status",
  19. #                               "mod_setenv",
  20.                                "mod_fastcgi",
  21. #                               "mod_proxy",
  22.                                 "mod_simple_vhost",
  23. #                               "mod_evhost",
  24. #                               "mod_userdir",
  25.                                 "mod_cgi",
  26.                                 "mod_dirlisting",
  27. #                               "mod_compress",
  28. #                               "mod_ssi",
  29. #                               "mod_usertrack",
  30. #                               "mod_expire",
  31. #                               "mod_secdownload",
  32. #                               "mod_rrdtool",
  33.                                 "mod_accesslog" )
  34.  
  35. ## a static document-root, for virtual-hosting take look at the
  36. ## server.virtual-* options
  37. server.document-root        = "/opt/share/www"
  38.  
  39. ## where to send error-messages to
  40. server.errorlog             = "/opt/var/log/lighttpd/error.log"
  41.  
  42. # files to check for if .../ is requested
  43. index-file.names            = ( "index.php", "index.html",
  44.                                 "index.htm", "default.htm",
  45.                 ) # "lighttpd/index.html" )
  46.                
  47.  
  48. #### accesslog module
  49. accesslog.filename          = "/opt/var/log/lighttpd/access.log"
  50.  
  51. ## deny access the file-extensions
  52. url.access-deny             = ( "~", ".inc" )
  53.  
  54.  
  55.  
  56. ##
  57. # which extensions should not be handle via static-file transfer
  58. #
  59. # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
  60. static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb" )
  61.  
  62. ######### Options that are good to be but not neccesary to be changed #######
  63.  
  64. ## bind to port (default: 80)
  65. server.port                = 80
  66.  
  67. ## to help the rc.scripts
  68. server.pid-file            = "/var/run/lighttpd.pid"
  69.  
  70.  
  71. ## virtual directory listings
  72. dir-listing.activate       = "enable"
  73. #dir-listing.encoding="iso-8859-15"
  74. dir-listing.hide-dotfiles="enable"
  75.  
  76.  
  77. fastcgi.server              = ( ".php" =>
  78.                                   ((
  79.                                     "host" => "192.168.1.1",
  80.                                     "port" => 1026,
  81.                                   ))
  82.                               )
  83.                              
  84. auth.debug = 2
  85. auth.backend = "plain"
  86. auth.backend.plain.userfile = "/opt/etc/.lighttpd.user.0"
  87.  
  88. auth.require = (
  89. "/" => ( # everything below the / path ?
  90. "method"  => "basic",
  91. "realm"   => "password protected",
  92. "require" => "valid-user"
  93. ),
  94. "/user1" => ( # everything below the /user1 path
  95. "method"  => "basic",
  96. "realm"   => "password protected",
  97. "require" => "user=admin|user=user1"
  98. ),
  99. "/user2" => ( # everything below the /user2 path
  100. "method"  => "basic",
  101. "realm"   => "password protected",
  102. "require" => "user=admin|user=user2"
  103. ),
  104. "/guest" => ( # everything below the /guest path
  105. "method"  => "basic",
  106. "realm"   => "password protected",
  107. "require" => "user=admin|user=guest"
  108. )
  109. )
  110.  
  111.    
  112. $HTTP["cookie"] !~ "(troute=1)" {
  113.   url.rewrite = (
  114.     "/(.*)" => "/redirect.php?/$1"
  115.   )
  116. }
  117.  
  118. # Configuration from other optware packages
  119. include_shell "cat /opt/etc/lighttpd/conf.d/*.conf"
  120.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement