Lighttpd.conf

14.10.09

#######################################################
###  lighttpd.conf  BEGIN
#######################################################
#
#### modules to load
server.modules           = (
#                            "mod_expire",
                             "mod_auth",
                             "mod_access",
#                            "mod_evasive",
#                            "mod_compress",
#                            "mod_status",
#                            "mod_redirect",
                             "mod_accesslog",
                             "mod_rewrite",
                             "mod_fastcgi",
 )

#### performance options (aggressive timeouts)
server.max-keep-alive-requests = 6
server.max-keep-alive-idle = 15
server.max-read-idle     = 15
server.max-write-idle    = 15

## single client connection bandwidth limit in kilobytes (0=unlimited)
connection.kbytes-per-second = 0

## global server bandwidth limit in kilobytes (0=unlimited)
server.kbytes-per-second = 0

#### bind to interface (default: all interfaces)
#server.bind              = "127.0.0.1"

#### bind to port (default: 80)
server.port              = 80

#### run daemon as uid (default: don't care)
server.username          = "lighttpd"

#### run daemon as gid (default: don't care)
server.groupname         = "lighttpd"

#### set the pid file (newsyslog)
server.pid-file          = "/var/run/lighttpd.pid"

#### name the server daemon publicly displays
server.tag               = "lighttpd"

#### static document-root
server.document-root     = "/var/www/servers/"

#### chroot() to directory (default: no chroot() )
#server.chroot            = "/"

#### files to check for if .../ is requested
index-file.names         = ( "index.php", "index.html",
                             "index.htm", "default.htm" )

#### disable auto index directory listings
dir-listing.activate     = "disable"

#### disable ssl if not needed
ssl.engine               = "disable"

#### compress module
#compress.cache-dir       = "/tmp/lighttpd/cache"
#compress.filetype        = ("text/plain", "text/html", "text/css",
#"image/png")

#### expire module
#expire.url               = ( "" => "access plus 6 hours")

#### accesslog module
accesslog.filename       = "/var/log/lighttpd/access.log"

#### error log
server.errorlog          = "/var/log/lighttpd/error.log"

#### mod_evasive
#evasive.max-conns-per-ip = 250

#### limit request method "POST" size in kilobytes (KB)
server.max-request-size  = 1

#### disable multi range requests
server.range-requests    = "disable"

#### disable symlinks
server.follow-symlink    = "disable"

#### ONLY serve files with all lowercase file names
server.force-lowercase-filenames = "disable"

#### mimetype mapping
mimetype.assign             = (
  ".pdf"          =>      "application/pdf",
#  ".sig"          =>      "application/pgp-signature",
#  ".spl"          =>      "application/futuresplash",
#  ".class"        =>      "application/octet-stream",
#  ".ps"           =>      "application/postscript",
#  ".torrent"      =>      "application/x-bittorrent",
#  ".dvi"          =>      "application/x-dvi",
#  ".gz"           =>      "application/x-gzip",
#  ".pac"          =>      "application/x-ns-proxy-autoconfig",
  ".swf"          =>      "application/x-shockwave-flash",
  ".tar.gz"       =>      "application/x-tgz",
  ".tgz"          =>      "application/x-tgz",
  ".tar"          =>      "application/x-tar",
  ".zip"          =>      "application/zip",
#  ".mp3"          =>      "audio/mpeg",
  ".m3u"          =>      "audio/x-mpegurl",
#  ".wma"          =>      "audio/x-ms-wma",
  ".wax"          =>      "audio/x-ms-wax",
  ".ogg"          =>      "application/ogg",
#  ".wav"          =>      "audio/x-wav",
  ".gif"          =>      "image/gif",
  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",
  ".png"          =>      "image/png",
#  ".xbm"          =>      "image/x-xbitmap",
#  ".xpm"          =>      "image/x-xpixmap",
#  ".xwd"          =>      "image/x-xwindowdump",
  ".css"          =>      "text/css",
  ".html"         =>      "text/html",
  ".htm"          =>      "text/html",
  ".js"           =>      "text/javascript",
#  ".asc"          =>      "text/plain",
#  ".c"            =>      "text/plain",
#  ".cpp"          =>      "text/plain",
  ".log"          =>      "text/plain",
  ".conf"         =>      "text/plain",
  ".text"         =>      "text/plain",
  ".txt"          =>      "text/plain",
#  ".dtd"          =>      "text/xml",
  ".xml"          =>      "text/xml",
#  ".mpeg"         =>      "video/mpeg",
  ".mpg"          =>      "video/mpeg",
  ".mov"          =>      "video/quicktime",
  ".qt"           =>      "video/quicktime",
  ".avi"          =>      "video/x-msvideo",
  ".asf"          =>      "video/x-ms-asf",
  ".asx"          =>      "video/x-ms-asf",
  ".wmv"          =>      "video/x-ms-wmv",
  ".bz2"          =>      "application/x-bzip",
  ".tbz"          =>      "application/x-bzip-compressed-tar",
  ".tar.bz2"      =>      "application/x-bzip-compressed-tar"
###############################################################
server.breakagelog = /var/log/lighttpd/breakage.log

#### Para agregar mas virtual hosts.
$HTTP["host"] == "www.dominio.com" {
    server.document-root = /var/www/servers/dominio.com/pages
}
###############################################################
 )
fastcgi.server = ( ".php" => ((
                        "bin-path" => "/usr/bin/php-cgi",
                        "socket" => "/tmp/php.socket"
                )))
#
#######################################################
###  lighttpd.conf  END
#######################################################

Creative Commons License
Esta obra está bajo una licencia de Creative Commons.