Annotation of elwix/config/etc/default/lighttpd/lighttpd.conf.sample, revision 1.1.2.1

1.1.2.1 ! misho       1: # lighttpd configuration file
        !             2: #
        !             3: # use it as a base for lighttpd 1.0.0 and above
        !             4: #
        !             5: # $Id: lighttpd.conf.sample,v 1.1.1.1 2011/07/05 23:43:00 misho Exp $
        !             6: 
        !             7: ############ Options you really have to take care of ####################
        !             8: 
        !             9: ## modules to load
        !            10: # at least mod_access and mod_accesslog should be loaded
        !            11: # all other module should only be loaded if really neccesary
        !            12: # - saves some time
        !            13: # - saves memory
        !            14: server.modules              = (
        !            15: #                               "mod_rewrite",
        !            16: #                               "mod_redirect",
        !            17: #                               "mod_alias",
        !            18:                                 "mod_access",
        !            19: #                               "mod_trigger_b4_dl",
        !            20: #                               "mod_auth",
        !            21: #                               "mod_status",
        !            22: #                               "mod_setenv",
        !            23: #                               "mod_fastcgi",
        !            24: #                               "mod_proxy",
        !            25: #                               "mod_simple_vhost",
        !            26: #                               "mod_evhost",
        !            27: #                               "mod_userdir",
        !            28: #                               "mod_cgi",
        !            29: #                               "mod_compress",
        !            30: #                               "mod_ssi",
        !            31: #                               "mod_usertrack",
        !            32: #                               "mod_expire",
        !            33: #                               "mod_secdownload",
        !            34: #                               "mod_rrdtool",
        !            35:                                 "mod_accesslog" )
        !            36: 
        !            37: ## A static document-root. For virtual hosting take a look at the
        !            38: ## mod_simple_vhost module.
        !            39: server.document-root        = "/usr/local/www/data/"
        !            40: 
        !            41: ## where to send error-messages to
        !            42: server.errorlog             = "/var/log/lighttpd.error.log"
        !            43: 
        !            44: # files to check for if .../ is requested
        !            45: index-file.names            = ( "index.php", "index.html",
        !            46:                                 "index.htm", "default.htm" )
        !            47: 
        !            48: ## set the event-handler (read the performance section in the manual)
        !            49: server.event-handler = "freebsd-kqueue" # needed on OS X
        !            50: 
        !            51: # mimetype mapping
        !            52: mimetype.assign             = (
        !            53:   ".pdf"          =>      "application/pdf",
        !            54:   ".sig"          =>      "application/pgp-signature",
        !            55:   ".spl"          =>      "application/futuresplash",
        !            56:   ".class"        =>      "application/octet-stream",
        !            57:   ".ps"           =>      "application/postscript",
        !            58:   ".torrent"      =>      "application/x-bittorrent",
        !            59:   ".dvi"          =>      "application/x-dvi",
        !            60:   ".gz"           =>      "application/x-gzip",
        !            61:   ".pac"          =>      "application/x-ns-proxy-autoconfig",
        !            62:   ".swf"          =>      "application/x-shockwave-flash",
        !            63:   ".tar.gz"       =>      "application/x-tgz",
        !            64:   ".tgz"          =>      "application/x-tgz",
        !            65:   ".tar"          =>      "application/x-tar",
        !            66:   ".zip"          =>      "application/zip",
        !            67:   ".mp3"          =>      "audio/mpeg",
        !            68:   ".m3u"          =>      "audio/x-mpegurl",
        !            69:   ".wma"          =>      "audio/x-ms-wma",
        !            70:   ".wax"          =>      "audio/x-ms-wax",
        !            71:   ".ogg"          =>      "application/ogg",
        !            72:   ".wav"          =>      "audio/x-wav",
        !            73:   ".gif"          =>      "image/gif",
        !            74:   ".jar"          =>      "application/x-java-archive",
        !            75:   ".jpg"          =>      "image/jpeg",
        !            76:   ".jpeg"         =>      "image/jpeg",
        !            77:   ".png"          =>      "image/png",
        !            78:   ".xbm"          =>      "image/x-xbitmap",
        !            79:   ".xpm"          =>      "image/x-xpixmap",
        !            80:   ".xwd"          =>      "image/x-xwindowdump",
        !            81:   ".css"          =>      "text/css",
        !            82:   ".html"         =>      "text/html",
        !            83:   ".htm"          =>      "text/html",
        !            84:   ".js"           =>      "text/javascript",
        !            85:   ".asc"          =>      "text/plain",
        !            86:   ".c"            =>      "text/plain",
        !            87:   ".cpp"          =>      "text/plain",
        !            88:   ".log"          =>      "text/plain",
        !            89:   ".conf"         =>      "text/plain",
        !            90:   ".text"         =>      "text/plain",
        !            91:   ".txt"          =>      "text/plain",
        !            92:   ".dtd"          =>      "text/xml",
        !            93:   ".xml"          =>      "text/xml",
        !            94:   ".mpeg"         =>      "video/mpeg",
        !            95:   ".mpg"          =>      "video/mpeg",
        !            96:   ".mov"          =>      "video/quicktime",
        !            97:   ".qt"           =>      "video/quicktime",
        !            98:   ".avi"          =>      "video/x-msvideo",
        !            99:   ".asf"          =>      "video/x-ms-asf",
        !           100:   ".asx"          =>      "video/x-ms-asf",
        !           101:   ".wmv"          =>      "video/x-ms-wmv",
        !           102:   ".bz2"          =>      "application/x-bzip",
        !           103:   ".tbz"          =>      "application/x-bzip-compressed-tar",
        !           104:   ".tar.bz2"      =>      "application/x-bzip-compressed-tar",
        !           105:   # default mime type
        !           106:   ""              =>      "application/octet-stream",
        !           107:  )
        !           108: 
        !           109: # Use the "Content-Type" extended attribute to obtain mime type if possible
        !           110: #mimetype.use-xattr        = "enable"
        !           111: 
        !           112: 
        !           113: ## send a different Server: header
        !           114: ## be nice and keep it at lighttpd
        !           115: # server.tag                 = "lighttpd"
        !           116: 
        !           117: #### accesslog module
        !           118: accesslog.filename          = "/var/log/lighttpd.access.log"
        !           119: 
        !           120: ## deny access the file-extensions
        !           121: #
        !           122: # ~    is for backupfiles from vi, emacs, joe, ...
        !           123: # .inc is often used for code includes which should in general not be part
        !           124: #      of the document-root
        !           125: url.access-deny             = ( "~", ".inc" )
        !           126: 
        !           127: $HTTP["url"] =~ "\.pdf$" {
        !           128:   server.range-requests = "disable"
        !           129: }
        !           130: 
        !           131: ##
        !           132: # which extensions should not be handle via static-file transfer
        !           133: #
        !           134: # .php, .pl, .fcgi are most often handled by mod_fastcgi or mod_cgi
        !           135: static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
        !           136: 
        !           137: ######### Options that are good to be but not neccesary to be changed #######
        !           138: 
        !           139: ## bind to port (default: 80)
        !           140: #server.port                = 81
        !           141: 
        !           142: ## bind to localhost (default: all interfaces)
        !           143: #server.bind                = "127.0.0.1"
        !           144: 
        !           145: ## error-handler for status 404
        !           146: #server.error-handler-404   = "/error-handler.html"
        !           147: #server.error-handler-404   = "/error-handler.php"
        !           148: 
        !           149: ## to help the rc.scripts
        !           150: server.pid-file            = "/var/run/lighttpd.pid"
        !           151: 
        !           152: 
        !           153: ###### virtual hosts
        !           154: ##
        !           155: ##  If you want name-based virtual hosting add the next three settings and load
        !           156: ##  mod_simple_vhost
        !           157: ##
        !           158: ## document-root =
        !           159: ##   virtual-server-root + virtual-server-default-host + virtual-server-docroot
        !           160: ## or
        !           161: ##   virtual-server-root + http-host + virtual-server-docroot
        !           162: ##
        !           163: #simple-vhost.server-root   = "/srv/www/vhosts/"
        !           164: #simple-vhost.default-host  = "www.example.org"
        !           165: #simple-vhost.document-root = "/htdocs/"
        !           166: 
        !           167: 
        !           168: ##
        !           169: ## Format: <errorfile-prefix><status-code>.html
        !           170: ## -> ..../status-404.html for 'File not found'
        !           171: #server.errorfile-prefix    = "/usr/share/lighttpd/errors/status-"
        !           172: #server.errorfile-prefix    = "/srv/www/errors/status-"
        !           173: 
        !           174: ## virtual directory listings
        !           175: #dir-listing.activate       = "enable"
        !           176: ## select encoding for directory listings
        !           177: #dir-listing.encoding        = "utf-8"
        !           178: 
        !           179: ## enable debugging
        !           180: #debug.log-request-header   = "enable"
        !           181: #debug.log-response-header  = "enable"
        !           182: #debug.log-request-handling = "enable"
        !           183: #debug.log-file-not-found   = "enable"
        !           184: 
        !           185: ### only root can use these options
        !           186: #
        !           187: # chroot() to directory (default: no chroot() )
        !           188: #server.chroot              = "/"
        !           189: 
        !           190: ## change uid to <uid> (default: don't care)
        !           191: server.username            = "www"
        !           192: 
        !           193: ## change uid to <uid> (default: don't care)
        !           194: server.groupname           = "www"
        !           195: 
        !           196: #### compress module
        !           197: #compress.cache-dir         = "/var/cache/lighttpd/compress/"
        !           198: #compress.filetype          = ("text/plain", "text/html")
        !           199: 
        !           200: #### proxy module
        !           201: ## read proxy.txt for more info
        !           202: #proxy.server               = ( ".php" =>
        !           203: #                               ( "localhost" =>
        !           204: #                                 (
        !           205: #                                   "host" => "192.168.0.101",
        !           206: #                                   "port" => 80
        !           207: #                                 )
        !           208: #                               )
        !           209: #                             )
        !           210: 
        !           211: #### fastcgi module
        !           212: ## read fastcgi.txt for more info
        !           213: ## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
        !           214: #fastcgi.server             = ( ".php" =>
        !           215: #                               ( "localhost" =>
        !           216: #                                 (
        !           217: #                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
        !           218: #                                   "bin-path" => "/usr/local/bin/php-cgi-cgi"
        !           219: #                                 )
        !           220: #                               )
        !           221: #                            )
        !           222: 
        !           223: #### CGI module
        !           224: #cgi.assign                 = ( ".pl"  => "/usr/bin/perl",
        !           225: #                               ".cgi" => "/usr/bin/perl" )
        !           226: #
        !           227: 
        !           228: #### SSL engine
        !           229: #ssl.engine                 = "enable"
        !           230: #ssl.pemfile                = "/etc/ssl/private/lighttpd.pem"
        !           231: 
        !           232: #### status module
        !           233: #status.status-url          = "/server-status"
        !           234: #status.config-url          = "/server-config"
        !           235: 
        !           236: #### auth module
        !           237: ## read authentication.txt for more info
        !           238: #auth.backend               = "plain"
        !           239: #auth.backend.plain.userfile = "lighttpd.user"
        !           240: #auth.backend.plain.groupfile = "lighttpd.group"
        !           241: 
        !           242: #auth.backend.ldap.hostname = "localhost"
        !           243: #auth.backend.ldap.base-dn  = "dc=my-domain,dc=com"
        !           244: #auth.backend.ldap.filter   = "(uid=$)"
        !           245: 
        !           246: #auth.require               = ( "/server-status" =>
        !           247: #                               (
        !           248: #                                 "method"  => "digest",
        !           249: #                                 "realm"   => "download archiv",
        !           250: #                                 "require" => "user=jan"
        !           251: #                               ),
        !           252: #                               "/server-config" =>
        !           253: #                               (
        !           254: #                                 "method"  => "digest",
        !           255: #                                 "realm"   => "download archiv",
        !           256: #                                 "require" => "valid-user"
        !           257: #                               )
        !           258: #                             )
        !           259: 
        !           260: #### url handling modules (rewrite, redirect, access)
        !           261: #url.rewrite                = ( "^/$"             => "/server-status" )
        !           262: #url.redirect               = ( "^/wishlist/(.+)" => "http://www.123.org/$1" )
        !           263: #### both rewrite/redirect support back reference to regex conditional using %n
        !           264: #$HTTP["host"] =~ "^www\.(.*)" {
        !           265: #  url.redirect            = ( "^/(.*)" => "http://%1/$1" )
        !           266: #}
        !           267: 
        !           268: #
        !           269: # define a pattern for the host url finding
        !           270: # %% => % sign
        !           271: # %0 => domain name + tld
        !           272: # %1 => tld
        !           273: # %2 => domain name without tld
        !           274: # %3 => subdomain 1 name
        !           275: # %4 => subdomain 2 name
        !           276: #
        !           277: #evhost.path-pattern        = "/srv/www/vhosts/%3/htdocs/"
        !           278: 
        !           279: #### expire module
        !           280: #expire.url                 = ( "/buggy/" => "access 2 hours", "/asdhas/" => "access plus 1 seconds 2 minutes")
        !           281: 
        !           282: #### ssi
        !           283: #ssi.extension              = ( ".shtml" )
        !           284: 
        !           285: #### rrdtool
        !           286: #rrdtool.binary             = "/usr/bin/rrdtool"
        !           287: #rrdtool.db-name            = "/var/lib/lighttpd/lighttpd.rrd"
        !           288: 
        !           289: #### setenv
        !           290: #setenv.add-request-header  = ( "TRAV_ENV" => "mysql://user@host/db" )
        !           291: #setenv.add-response-header = ( "X-Secret-Message" => "42" )
        !           292: 
        !           293: ## for mod_trigger_b4_dl
        !           294: # trigger-before-download.gdbm-filename = "/var/lib/lighttpd/trigger.db"
        !           295: # trigger-before-download.memcache-hosts = ( "127.0.0.1:11211" )
        !           296: # trigger-before-download.trigger-url = "^/trigger/"
        !           297: # trigger-before-download.download-url = "^/download/"
        !           298: # trigger-before-download.deny-url = "http://127.0.0.1/index.html"
        !           299: # trigger-before-download.trigger-timeout = 10
        !           300: 
        !           301: #### variable usage:
        !           302: ## variable name without "." is auto prefixed by "var." and becomes "var.bar"
        !           303: #bar = 1
        !           304: #var.mystring = "foo"
        !           305: 
        !           306: ## integer add
        !           307: #bar += 1
        !           308: ## string concat, with integer cast as string, result: "www.foo1.com"
        !           309: #server.name = "www." + mystring + var.bar + ".com"
        !           310: ## array merge
        !           311: #index-file.names = (foo + ".php") + index-file.names
        !           312: #index-file.names += (foo + ".php")
        !           313: 
        !           314: #### include
        !           315: #include /etc/lighttpd/lighttpd-inc.conf
        !           316: ## same as above if you run: "lighttpd -f /etc/lighttpd/lighttpd.conf"
        !           317: #include "lighttpd-inc.conf"
        !           318: 
        !           319: #### include_shell
        !           320: #include_shell "echo var.a=1"
        !           321: ## the above is same as:
        !           322: #var.a=1
        !           323: 
        !           324: # Enable IPV6 and IPV4 together
        !           325: server.use-ipv6 = "enable"
        !           326: $SERVER["socket"] == "0.0.0.0:80" { }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>