Skip to content

lighttpd

Giới thiệu và license

lighttpd ("lighty") là web server nhẹ, chạy theo mô hình event-driven một tiến trình, phù hợp với thiết bị nhúng có RAM và CPU hạn chế. License: BSD-3-Clause.

Kích thước và tài nguyên sử dụng

Build / cross-compile

Yocto

Recipe có sẵn trong openembedded-core (meta/recipes-extended/lighttpd):

IMAGE_INSTALL:append = " lighttpd lighttpd-module-fastcgi"

Petalinux

petalinux-config -c rootfs
# Filesystem Packages → ... → lighttpd

Buildroot

BR2_PACKAGE_LIGHTTPD=y
BR2_PACKAGE_LIGHTTPD_OPENSSL=y

Cấu hình mẫu

server.document-root = "/www"
server.port          = 80
server.username      = "www-data"
server.groupname     = "www-data"
server.modules      += ( "mod_fastcgi" )

index-file.names     = ( "index.html" )
dir-listing.activate = "disable"

Kiểm tra cú pháp cấu hình:

lighttpd -t -f /etc/lighttpd/lighttpd.conf

Tích hợp

CGI / FastCGI

HTTPS

Debug và tuning

Tài liệu tham khảo