lighttpd

lighttpd

Lighttpd 是一個德國人領導的開源Web伺服器軟體。

基本介紹

  • 軟體名稱:lighttpd
  • 軟體版本:1.4.49
  • 更新時間:2018/03/11
  • 軟體語言:英語
  • 簡介:Lighttpd 開源Web伺服器軟體
  • 作業系統:Linux/Windows/Android
簡介,作業系統,安裝過程,高級特性,認證方法,PHP支持,安全特性,

簡介

Lighttpd 是一個德國人領導的開源Web伺服器軟體,其根本的目的是提供一個專門針對高性能網站,安全、快速、兼容性好並且靈活的web server環境。具有非常低的記憶體開銷、cpu占用率低、效能好以及豐富的模組等特點。
Lighttpd是眾多OpenSource輕量級的web server中較為優秀的一個。支持FastCGI,CGI,Auth,輸出壓縮(output compress),URL重寫,Alias等重要功能;而Apache之所以流行,很大程度也是因為功能豐富,在lighttpd上很多功能都有相應的實現了,這點對於apache的用戶是非常重要的,因為遷移到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
AIX
● Android

安裝過程

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""

高級特性

virtual directory listingsURL-Rewriting,HTTP-Redirects,FLV-streaming
automatic expiration offiles
大檔案支持(64bit file offsets)
斷點續傳(start-end,start-,-end,multipleranges)
壓縮輸出(支持deflate,gzip,bzip2)

認證方法

basic,digest
backends:plainfiles,htpasswd,htdigest,ldap
fastand secure application controlled downloads
Server Side Includes
User Tracking
FastCGI,CGI,SSI
SSL

PHP支持

通過FastCGI和CGI接口實現
支持PHP代碼快取,例如XCache,APC或eAccelarator
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"                 )))

安全特性

chroot(),setUID,setGID
protecting doc root
strict HTTP-header parsing

相關詞條

熱門詞條

聯絡我們