Lighttpd: Instalacja i podstawowa konfiguracja

Lighttpd to prosty a zarazem szybki serwer WWW.

Podstawowy plik konfiguracyjny

server.network-backend = "write"
server.document-root = "/www2/"
mimetype.assign = (  
	".pdf"   => "application/pdf",
	".class" => "application/octet-stream",
	".pac"   => "application/x-ns-proxy-autoconfig",
	".swf"   => "application/x-shockwave-flash",
	".wav"   => "audio/x-wav",
	".gif"   => "image/gif",
	".jpg"   => "image/jpeg",
	".jpeg"  => "image/jpeg",
	".png"   => "image/png",
	".svg"   => "image/svg+xml",
	".css"   => "text/css",
	".html"  => "text/html",
	".htm"   => "text/html",
	".js"    => "text/javascript",
	".txt"   => "text/plain",
	".dtd"   => "text/xml",
	".xml"   => "text/xml"
 )
$HTTP["url"] =~ "\.pdf$" {
	server.range-requests = "disable"
}
server.port = 82
server.pid-file = "/var/run/lighttpd.pid"
server.upload-dirs = ( "/tmp" )

Logi z działalności

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

Pliki indeksów

index-file.names = ( "index.html", "default.html", "index.htm", "default.htm", "index.php" )

Dodatkowa funkcjonalność: moduły

server.modules = ( 
	"mod_fastcgi"
)

Generowanie plików dynamicznie

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

FastCGI

fastcgi.server = (
	".php" => (
		"localhost" => (
			"host" => "127.0.0.1",
			"port" => "1026"
			
		)
	)
)

Bezpieczeństwo

server.tag = "ziutus-WWW-serv"

Dodaj komentarz