Lighttpd

来自开放百科 - 灰狐
(版本间的差异)
跳转到: 导航, 搜索
(DDoS)
 
(未显示2个用户的42个中间版本)
第1行: 第1行:
[[Image:Lighttpd_logo.png|right]]
+
[[Image:Lighttpd-90x90.gif|right]]
==简介==
+
Light footprint + httpd = Lighttpd
Light footprint + httpd = LightTPD
+
  
Lighttpd是一个德国人领导的开源软件,其根本的目的是提供一个专门针对高性能网站,安全、快速、兼容性好并且灵活的web server环境。具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。lighttpd是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能,而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现了,这点对于apache的用户是非常重要的,因为迁移到lighttpd就必须面对这些问题。
+
[[Image:Flight-680x100.jpg||right|飞得更高、更快]]
 +
==简介==
 +
[[Image:Lighttpd-64.jpg]]是一个德国人领导的开源软件,其根本的目的是提供一个专门针对高性能网站,安全、快速、兼容性好并且灵活的web server环境。具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。lighttpd是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能,而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现了,这点对于apache的用户是非常重要的,因为迁移到lighttpd就必须面对这些问题。
  
 
在google搜索了一下,简体中文介绍lighttpd的文章几乎没有,大多数都是台湾同胞的Big5内容。因此在接下来的时间里,想好好写一篇介绍lighttpd,以及简单的benchmark的文章。
 
在google搜索了一下,简体中文介绍lighttpd的文章几乎没有,大多数都是台湾同胞的Big5内容。因此在接下来的时间里,想好好写一篇介绍lighttpd,以及简单的benchmark的文章。
第11行: 第12行:
 
利用apache的rewrite技术,将繁重的cgi/fastcgi任务交给lighttpd来完成,充分利用两者的优点,现在那台服务器的负载下降了一个数量级,而且反应速度也提高了一个甚至是2个数量级!
 
利用apache的rewrite技术,将繁重的cgi/fastcgi任务交给lighttpd来完成,充分利用两者的优点,现在那台服务器的负载下降了一个数量级,而且反应速度也提高了一个甚至是2个数量级!
  
==基本特色==
+
==新闻==
 +
{{SeeWikipedia}}
 +
<rss>http://blog.lighttpd.net/xml/rss20/feed.xml|short|date|max=10</rss>
  
 +
==基本操作==
 +
# killall -u www
 +
# /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf &
 +
将其加入自动启动的服务里
  
 
==安装指南==
 
==安装指南==
 +
http://trac.lighttpd.net/trac/wiki/TutorialInstallation
 
*在 Ubuntu 5.04(FreeBSD 5.5)上安装 Ruby, Rails, Lighttpd, MySQL  
 
*在 Ubuntu 5.04(FreeBSD 5.5)上安装 Ruby, Rails, Lighttpd, MySQL  
 
点击 [[Install Ruby Rails Lighttpd MySQL on Ubuntu or FreeBSD]]
 
点击 [[Install Ruby Rails Lighttpd MySQL on Ubuntu or FreeBSD]]
 
*在 FreeBSD 5.5, 6.1 上安装 Lightttpd,PHP,MySQL 点击 [[FreeBSD_Lighttpd_PHP_MySQL]]
 
*在 FreeBSD 5.5, 6.1 上安装 Lightttpd,PHP,MySQL 点击 [[FreeBSD_Lighttpd_PHP_MySQL]]
 
+
*在 Debian 上安装 Lightttpd,PHP,MySQL 点击 [[Debian_Lighttpd_PHP_MySQL]]
 +
*[[Installing MediaWiki with Lighttpd]]
 +
*通过在 [[Cygwin]] 上安装 Lighttpd, 可作为在 Windows 上开发测试使用。
 +
*[[Lighttpd on Debian]]
 +
==Python and Lighttpd==
 +
*[[Python FastCGI WSGI and Lighttpd|Python, FastCGI, WSGI, and Lighttpd]]
 +
*[[Quixote on Lighttpd]]
 +
*[[Django on Lighttpd]]
 +
*[[TurboGears on Lighttpd]]
 +
==Appliction on Lighttpd==
 +
*[[Subversion on Lighttpd]]
 +
*[[ViewVC on Lighttpd]] 
 
==Modules==
 
==Modules==
 
* mod_accesslog - [[Lighttpd_Accesslog|Accesslog]]
 
* mod_accesslog - [[Lighttpd_Accesslog|Accesslog]]
第31行: 第50行:
 
* mod_expire - [[Controlling Expiration of cached Content]]
 
* mod_expire - [[Controlling Expiration of cached Content]]
 
* mod_fastcgi - [[Lighttpd_FastCGI|FastCGI]]
 
* mod_fastcgi - [[Lighttpd_FastCGI|FastCGI]]
* mod_mysql_vhost - [[MySQL virtual hosting]]
+
* mod_mysql_vhost - [[Lighttpd MySQL virtual hosting]]
 
* mod_proxy - [[Lighttpd_Proxy|Proxy]]
 
* mod_proxy - [[Lighttpd_Proxy|Proxy]]
 
* mod_redirect - [[Lighttpd_Redirect|Redirect]]
 
* mod_redirect - [[Lighttpd_Redirect|Redirect]]
* mod_rewrite - [[Lighttpd_Rewrite|Rewrite]]
+
* mod_rewrite - [[Lighttpd_ModRewrite|Rewrite]]
 
* mod_rrdtool - [[rrdtool]]
 
* mod_rrdtool - [[rrdtool]]
 
* mod_scgi - [[Lighttpd_SCGI|SCGI]]
 
* mod_scgi - [[Lighttpd_SCGI|SCGI]]
第41行: 第60行:
 
* mod_simple_vhost - [[Simple Virtual Hosting]]
 
* mod_simple_vhost - [[Simple Virtual Hosting]]
 
* mod_ssi - [[Server Side Includes]]
 
* mod_ssi - [[Server Side Includes]]
* mod_status - [[Server Status]]
+
* mod_status - [[Lighttpd Server Status|Server Status]]
 
* mod_trigger_b4_dl - [[Trigger before Download]] [Anti Hotlinking]
 
* mod_trigger_b4_dl - [[Trigger before Download]] [Anti Hotlinking]
 
* [disabled] [[Upload Progress]]
 
* [disabled] [[Upload Progress]]
 
* mod_userdir - [[User Directories]]
 
* mod_userdir - [[User Directories]]
 
* mod_webdav - [[Lighttpd_WebDAV|WebDAV]]
 
* mod_webdav - [[Lighttpd_WebDAV|WebDAV]]
 +
 +
lighttpd 404 redirect
 +
$HTTP["host"] == "www.myweb.com" {
 +
  server.document-root = "/usr/local/www/data/myweb.com/"
 +
  server.error-handler-404  = "/404.html"
 +
}
 +
 +
==配置样例==
 +
* [http://brodierao.com/journal/2006/04/29/my-lighttpd-configuration/ Lighttpd Configuration]
 +
* [[Lighttpd.conf examples]]
 +
==Server Status==
 +
[[Image:lighttpd-status-large.png|thumb|right|Lighttpd Server Status]]
 +
vi lighttpd.conf
 +
server.modules              = (
 +
"mod_status",
 +
status.status-url          = "/server-status"
 +
==DDoS==
 +
Apache2 中有防止DoS攻击的模块mod_evasive,lighttpd中也可以用mod_evasive来限制并发连接数防止DDOS攻击
 +
 +
"mod_evasive",
 +
 +
evasive.max-conns-per-ip = 3
 +
 +
==Update==
 +
从1.4.10 --> 1.4.19
 +
http://www.lighttpd.net/download/
 +
$ tar zxvf lighttpd-1.4.19.tar.gz
 +
$ cd lighttpd-1.4.19
 +
$ ./configure
 +
$ make
 +
$ su -
 +
# make install
 +
killall -u www
 +
/usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf // 将使用以前 1.4.10 配置
 +
整个升级过程就这么简单 :)
  
 
==相关链接==
 
==相关链接==
 
*官方网站 http://www.lighttpd.net/
 
*官方网站 http://www.lighttpd.net/
 
*下载 http://www.lighttpd.net/download/
 
*下载 http://www.lighttpd.net/download/
 +
*founder(Jan Kneschke): http://jan.kneschke.de/me/
 +
*http://docs.huihoo.com/lighttpd/
 +
*http://download.huihoo.com/lighttpd/
  
==精彩图片==
+
==Powered By lighttpd==
 
+
http://trac.lighttpd.net/trac/wiki/PoweredByLighttpd
==成功应用==
+
*http://youtube.com/
 +
*http://wikipedia.org/
 +
*http://meebo.com/
 
*http://www.mininova.org/
 
*http://www.mininova.org/
  
 
==性能评测==
 
==性能评测==
 +
 +
{{comment}}
 +
 +
[[category:web server]]

2015年3月7日 (六) 02:50的最后版本

Lighttpd-90x90.gif

Light footprint + httpd = Lighttpd

飞得更高、更快

目录

[编辑] 简介

Lighttpd-64.jpg是一个德国人领导的开源软件,其根本的目的是提供一个专门针对高性能网站,安全、快速、兼容性好并且灵活的web server环境。具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。lighttpd是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能,而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现了,这点对于apache的用户是非常重要的,因为迁移到lighttpd就必须面对这些问题。

在google搜索了一下,简体中文介绍lighttpd的文章几乎没有,大多数都是台湾同胞的Big5内容。因此在接下来的时间里,想好好写一篇介绍lighttpd,以及简单的benchmark的文章。

实用起来lighttpd确实非常不错,上文提到的apache overload的问题,用lighttpd就完全解决了。apache主要的问题是密集并发下,不断的fork()和切换,以及较高(相对于 lighttpd而言)的内存占用,使系统的资源几尽枯竭。而lighttpd采用了Multiplex技术,代码经过优化,体积非常小,资源占用很低,而且反应速度相当快。

利用apache的rewrite技术,将繁重的cgi/fastcgi任务交给lighttpd来完成,充分利用两者的优点,现在那台服务器的负载下降了一个数量级,而且反应速度也提高了一个甚至是2个数量级!

[编辑] 新闻

Wikipedia-35x35.png 您可以在Wikipedia上了解到此条目的英文信息 Lighttpd Thanks, Wikipedia.

自http://blog.lighttpd.net/xml/rss20/feed.xml加载RSS失败或RSS源被墙

[编辑] 基本操作

# killall -u www
# /usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf &

将其加入自动启动的服务里

[编辑] 安装指南

http://trac.lighttpd.net/trac/wiki/TutorialInstallation
  • 在 Ubuntu 5.04(FreeBSD 5.5)上安装 Ruby, Rails, Lighttpd, MySQL

点击 Install Ruby Rails Lighttpd MySQL on Ubuntu or FreeBSD

[编辑] Python and Lighttpd

[编辑] Appliction on Lighttpd

[编辑] Modules

lighttpd 404 redirect

$HTTP["host"] == "www.myweb.com" {
 server.document-root = "/usr/local/www/data/myweb.com/"
 server.error-handler-404   = "/404.html"
}

[编辑] 配置样例

[编辑] Server Status

Lighttpd Server Status

vi lighttpd.conf

server.modules              = (
"mod_status",
status.status-url          = "/server-status"

[编辑] DDoS

Apache2 中有防止DoS攻击的模块mod_evasive,lighttpd中也可以用mod_evasive来限制并发连接数防止DDOS攻击

"mod_evasive",

evasive.max-conns-per-ip = 3

[编辑] Update

从1.4.10 --> 1.4.19

http://www.lighttpd.net/download/
$ tar zxvf lighttpd-1.4.19.tar.gz
$ cd lighttpd-1.4.19
$ ./configure
$ make
$ su -
# make install
killall -u www
/usr/local/sbin/lighttpd -f /usr/local/etc/lighttpd.conf // 将使用以前 1.4.10 配置

整个升级过程就这么简单 :)

[编辑] 相关链接

[编辑] Powered By lighttpd

http://trac.lighttpd.net/trac/wiki/PoweredByLighttpd

[编辑] 性能评测

Comment-32x32.png

<discussion>characters_max=300</discussion>

分享您的观点
个人工具
名字空间

变换
操作
导航
工具箱