必威电竞|足球世界杯竞猜平台

lighttpd
來(lái)源:互聯(lián)網(wǎng)

Lighttpd 是一個(gè)德國(guó)人領(lǐng)導(dǎo)的開(kāi)源Web服務(wù)器軟件,其根本的目的是提供一個(gè)專(zhuān)門(mén)針對(duì)高性能網(wǎng)站,安全、快速、兼容性好并且靈活的web server環(huán)境。具有非常低的內(nèi)存開(kāi)銷(xiāo)、cpu占用率低、效能好以及豐富的模塊等特點(diǎn)。

簡(jiǎn)介

Lighttpd是眾多OpenSource輕量級(jí)的web server中較為優(yōu)秀的一個(gè)。支持FastCGI,CGI,Auth,輸出壓縮(output compress),URL重寫(xiě),Alias等重要功能;而apache之所以流行,很大程度也是因?yàn)楣δ茇S富,在lighttpd上很多功能都有相應(yīng)的實(shí)現(xiàn)了,這點(diǎn)對(duì)于apache的用戶(hù)是非常重要的,因?yàn)檫w移到lighttpd就必須面對(duì)這些問(wèn)題。

操作系統(tǒng)

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,Mac OS)

● SGIIRIX

● Windows(Cygwin)

While it is known to compile Cleanly on

● Solaris

IBM AIX

Android

安裝過(guò)程

1. 下載最新版本

2. 解壓、安裝、配置

shell> tar zxvf lighttpd-1.4.12.tar.gz

shell> cd lighttpd-1.4.12

shell> ./configure –prefix=/usr/local/lighttpd

殼層> ./make

shell> ./make install

shell> cp doc/rc.lighttpd.Red Hat /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

接下來(lái)打開(kāi)/etc/rc.d/init.d/lighttpd修改lighttpd的值如下

lighttpd=”/usr/local/lighttpd/sbin/lighttpd”

打開(kāi)/etc/lighttpd/lighttpd.conf修改服務(wù)的端口,以及文檔根目錄的路徑后啟動(dòng)lighttpd服務(wù)

shell> service lighttpd start

更多關(guān)于lighttpd的配置請(qǐng)看lighttpd的文檔

附注在lighttpd中可以通過(guò)下面的配置來(lái)實(shí)現(xiàn)每天一個(gè)訪問(wèn)日志文件:

accesslog.filename = “| /usr/local/lighttpd/bin/rotatelogs /usr/local/lighttpd/logs/access_%Y%m%d.log 86400″

其中rotatelogs直接從apache的bin目錄拷貝過(guò)來(lái)即可。

配置日志記錄格式:

accesslog.format = "%h %l %u %t "%r" 200 %b "%{Referer}i" "%{User-Agent}i""

高級(jí)特性

虛擬主機(jī)

virtual directory listingsURL-Rewriting,HTTP-Redirects,FLV-streaming

automatic expiration offiles

大文件支持(64bit file offsets)

斷點(diǎn)續(xù)傳(start-end,start-,-end,multipleranges)

壓縮輸出(支持deflate,gzip,bzip2)

認(rèn)證方法

basic,digest

backends:plainfiles,htpasswd,htdigest,ldap

fastand secure application controlled downloads

Server Side Includes

User Tracking

FastCGI,CGI,SSI

SSL

PHP支持

通過(guò)FastCGI和CGI接口實(shí)現(xiàn)

支持PHP代碼緩存,例如XCache,APC或eAccelarator

FastCGI負(fù)載均衡(one webserver distibutes request to multiple PHP-serversviaFastCGI)

在配置文件后面加入:

安全特性

chroot(),setUID,setGID

protecting doc root

strict HTTP-header parsing

參考資料 >

生活家百科家居網(wǎng)