5W site logo 5W - мой домашний сайт-блог с картинками, кино и плюшками.

lighttpd2.conf.txt

# /etc/lighttpd/lighttpd.conf: SliTaz LightTPD
# Web server configuration file.
# Configuration du serveur web.
#
# Documentation : /usr/share/doc/slitaz/handbook/web-server.html
# http://trac.lighttpd.net/trac/wiki#Documentation
#
#

# Root documents.
#
server.document-root = "/var/www/"

# Port, default for HTTP traffic is 80.
#
server.port = 80

# Server, user and group name.
#
server.username = "www"
server.groupname = "www"

# Server header.
# Be nice and keep it at lighttpd and SliTaz GNU/Linux.
#
server.tag = "lighttpd (SliTaz GNU/Linux)"

# Directory listings.
#
dir-listing.activate = "enable"
dir-listing.encoding = "iso8859-1"

# File to open by default.
#
index-file.names = ( "index.html","index.php", "index.cgi", "index.sh" )

# Log messages.
#
accesslog.filename = "/var/log/lighttpd/access.log"
server.errorlog = "/var/log/lighttpd/error.log"

# Server pid file
server.pid-file = "/var/run/lighttpd.pid"

# MIME type.
#
mimetype.assign = (
".html" => "text/html",
".htm" => "text/html",
".txt" => "text/plain",
".js" => "text/javascript",
".css" => "text/css",
".xml" => "text/xml",
".diff" => "text/plain",
".patch" => "text/plain",
".list" => "text/plain",
".log" => "text/plain",
".conf" => "text/plain",
".pdf" => "application/pdf",
".ps" => "application/postscript",
".jpg" => "image/jpeg",
".jpeg" => "image/jpeg",
".png" => "image/png",
".gif" => "image/gif",
".xbm" => "image/x-xbitmap",
".xpm" => "image/x-xpixmap",
".gz" => "application/x-gzip",
".tar.gz" => "application/x-tgz",
".torrent" => "application/x-bittorrent",
".ogg" => "application/ogg",
".cooklist" => "text/plain",
".tazpkg" => "application/x-tazpkg",
"README" => "text/plain",
"receipt" => "text/plain",
)

# Deny access the file-extensions.
#
url.access-deny = ( "~", ".inc" )

# Modules to load.
# See /usr/lib/lighttpd for all available modules.
#
server.modules = (
"mod_fastcgi",
"mod_access",
"mod_accesslog",
"mod_alias",
"mod_cgi",
"mod_rewrite",
"mod_status",
"mod_userdir",
"mod_auth",
"mod_proxy"
)

# User directory module.
#
userdir.path = "Public"
userdir.exclude-user = ("root")

# Status module.
#
status.status-url = "/server-status"

# Compress module
#
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ("text/plain", "text/html", "text/css", "text/xml", "text/javascript")

## CGI module. You can install Perl and assign .pl and .cgi script
# to /usr/bin/perl.
#
$HTTP["url"] =~ "/cgi-bin/" {
cgi.assign = (
".sh" => "/bin/sh",
".cgi" => "/bin/sh"
)
}

# Fast CGI modules for PHP.
fastcgi.map-extensions = ( ".php3" => ".php", ".php4" => ".php", ".php5" => ".php" )
#
fastcgi.server = ( ".php" => ((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/tmp/php.socket"
)))
#)))

# Alias urls for localhost (doc, examples and PHP info).
#
$HTTP["remoteip"] =~ "127.0.0.1" {
alias.url += (
"/doc/" => "/usr/share/doc/",
"/examples/" => "/usr/share/examples/",
"/phpinfo/" => "/usr/share/phpinfo/"
)
}

## Virtual hosts.
#
# If you want name-based virtual hosting load mod_simple_vhost.
#
# You can directly put vhost in this file or use a sepate one for all
# virtual hosting.
#
include "vhosts.conf"

# Example.org
#
#$HTTP["host"] =~ "(^|\.)example\.org$" {
#server.document-root = "/var/www/vhost/exemple.com/html"
#server.errorlog = "/var/log/lighttpd/example.org-error.log"
#accesslog.filename = "/var/log/lighttpd/example.org-access.log"
#}

# Deny access for all image stealers (anti-hotlinking for images)
#
#$HTTP["referer"] !~ "^($|http://www\.example\.org)" {
# url.access-deny = ( ".jpg", ".jpeg", ".png" )
#}