-
lighttpd
鎖定
《lighttpd》是一個德國人領導的開源Web服務器軟件。
- 軟件名稱
- lighttpd
- 最近更新時間
- 2018年03月11日
- 軟件語言
- 英語
- 軟件版本
- 1.4.49
- 簡 介
- Lighttpd 開源Web服務器軟件
- 操作系統
- Linux/Windows/Android
lighttpd簡介
其根本的目的是提供一個專門針對高性能網站,安全、快速、兼容性好並且靈活的web server環境。具有非常低的內存開銷、cpu佔用率低、效能好以及豐富的模塊等特點。
Lighttpd是眾多OpenSource輕量級的web server中較為優秀的一個。支持FastCGI,CGI,Auth,輸出壓縮(output compress),URL重寫,Alias等重要功能;而Apache之所以流行,很大程度也是因為功能豐富,在lighttpd上很多功能都有相應的實現了,這點對於apache的用户是非常重要的,因為遷移到lighttpd就必須面對這些問題。
lighttpd操作系統
Releases of lighttpd are built regulary for at least the following platforms
● Linux(binary packages for FC3,SuSE,Debian,Gentoo,PLD-Linux,OpenWRT,Ubuntu)
● *BSD(FreeBSD,NetBSD,OpenBSD,MacOSX)
● SGIIRIX
● Windows(Cygwin)
While it is known to compile cleanly on
● Solaris
● AIX
● Android
lighttpd安裝過程
1. 下載最新版本
2. 解壓、安裝、配置
shell> tar zxvf lighttpd-1.4.12.tar.gz
shell> cd lighttpd-1.4.12
shell> ./configure –prefix=/usr/local/lighttpd
shell> ./make
shell> ./make install
shell> cp doc/rc.lighttpd.redhat /etc/rc.d/init.d/lighttpd
shell> cp doc/sysconfig.lighttpd /etc/sysconfig/lighttpd
shell> mkdir /etc/lighttpd
shell> cp doc/lighttpd.conf /etc/lighttpd/lighttpd.conf
shell> chkconfig lighttpd on
接下來打開/etc/rc.d/init.d/lighttpd修改lighttpd的值如下
lighttpd=”/usr/local/lighttpd/sbin/lighttpd”
打開/etc/lighttpd/lighttpd.conf修改服務的端口,以及文檔根目錄的路徑後啓動lighttpd服務
shell> service lighttpd start
更多關於lighttpd的配置請看lighttpd的文檔
附註在lighttpd中可以通過下面的配置來實現每天一個訪問日誌文件:
accesslog.filename = “| /usr/local/lighttpd/bin/rotatelogs /usr/local/lighttpd/logs/access_%Y%m%d.log 86400″
其中rotatelogs直接從apache的bin目錄拷貝過來即可。
配置日誌記錄格式:
accesslog.format = "%h %l %u %t "%r" 200 %b "%{Referer}i" "%{User-Agent}i""
lighttpd高級特性
virtual directory listingsURL-Rewriting,HTTP-Redirects,FLV-streaming
automatic expiration offiles
大文件支持(64bit file offsets)
斷點續傳(start-end,start-,-end,multipleranges)
壓縮輸出(支持deflate,gzip,bzip2)
lighttpd認證方法
basic,digest
backends:plainfiles,htpasswd,htdigest,ldap
fastand secure application controlled downloads
Server Side Includes
User Tracking
FastCGI,CGI,SSI
SSL
lighttpdPHP支持
通過FastCGI和CGI接口實現
FastCGI負載均衡(one webserver distibutes request to multiple PHP-serversviaFastCGI)
server.modules = ( "mod_fastcgi", )fastcgi.server = ( ".php" => (( "bin-path" => "/usr/bin/php-cgi", "socket" => "/tmp/php.socket", "max-procs" => 2, "bin-environment" => ( "PHP_FCGI_CHILDREN" => "16", "PHP_FCGI_MAX_REQUESTS" => "10000" ), "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), "broken-scriptfilename" => "enable" )))
lighttpd安全特性
chroot(),setUID,setGID
protecting doc root
strict HTTP-header parsing
- 參考資料
-
- 1. Lighttpd Wiki .Lighttpd Wiki[引用日期2018-04-29]