Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # lighttpd configuration file
- #
- # use it as a base for lighttpd 1.0.0 and above
- #
- # $Id: lighttpd.conf 8860 2008-08-05 10:56:16Z engy $
- ############ Options you really have to take care of ####################
- ## modules to load
- server.modules = (
- "mod_rewrite",
- "mod_redirect",
- # "mod_alias",
- "mod_access",
- # "mod_cml",
- # "mod_trigger_b4_dl",
- "mod_auth",
- "mod_status",
- # "mod_setenv",
- "mod_fastcgi",
- # "mod_proxy",
- "mod_simple_vhost",
- # "mod_evhost",
- # "mod_userdir",
- "mod_cgi",
- "mod_dirlisting",
- # "mod_compress",
- # "mod_ssi",
- # "mod_usertrack",
- # "mod_expire",
- # "mod_secdownload",
- # "mod_rrdtool",
- "mod_accesslog" )
- ## a static document-root, for virtual-hosting take look at the
- ## server.virtual-* options
- server.document-root = "/opt/share/www"
- ## where to send error-messages to
- server.errorlog = "/opt/var/log/lighttpd/error.log"
- # files to check for if .../ is requested
- index-file.names = ( "index.php", "index.html",
- "index.htm", "default.htm",
- ) # "lighttpd/index.html" )
- #### accesslog module
- accesslog.filename = "/opt/var/log/lighttpd/access.log"
- ## deny access the file-extensions
- url.access-deny = ( "~", ".inc" )
- ##
- # which extensions should not be handle via static-file transfer
- #
- # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
- static-file.exclude-extensions = ( ".fcgi", ".php", ".pl", ".py", ".rb" )
- ######### Options that are good to be but not neccesary to be changed #######
- ## bind to port (default: 80)
- server.port = 80
- ## to help the rc.scripts
- server.pid-file = "/var/run/lighttpd.pid"
- ## virtual directory listings
- dir-listing.activate = "enable"
- #dir-listing.encoding="iso-8859-15"
- dir-listing.hide-dotfiles="enable"
- fastcgi.server = ( ".php" =>
- ((
- "host" => "192.168.1.1",
- "port" => 1026,
- ))
- )
- auth.debug = 2
- auth.backend = "plain"
- auth.backend.plain.userfile = "/opt/etc/.lighttpd.user.0"
- auth.require = (
- "/" => ( # everything below the / path ?
- "method" => "basic",
- "realm" => "password protected",
- "require" => "valid-user"
- ),
- "/user1" => ( # everything below the /user1 path
- "method" => "basic",
- "realm" => "password protected",
- "require" => "user=admin|user=user1"
- ),
- "/user2" => ( # everything below the /user2 path
- "method" => "basic",
- "realm" => "password protected",
- "require" => "user=admin|user=user2"
- ),
- "/guest" => ( # everything below the /guest path
- "method" => "basic",
- "realm" => "password protected",
- "require" => "user=admin|user=guest"
- )
- )
- $HTTP["cookie"] !~ "(troute=1)" {
- url.rewrite = (
- "/(.*)" => "/redirect.php?/$1"
- )
- }
- # Configuration from other optware packages
- include_shell "cat /opt/etc/lighttpd/conf.d/*.conf"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement