March 10, 2008 at 20:29
libmemcached 作者新作, mod_memcached.
This is an Apache module that provides GET, PUT, and DELETE services to Memcached clusters. Using this you can serve content directly from memcached through Apache to clients.
如果硬要比较,
nginx 的 ngx_http_memcached_module.
lighttpd + lua(mod_magnet) , Memcached.lua.
(由于 luasocket 和 lighttpd 的冲突, 这个方式好像不行.)
Mod_mem_cache, 国人作品.
(lighty 原有的 mod_cml 也有 memcached 支持, 但是现在已经被废弃了
)
有要用的自己上吧, 未经测试, 不保证稳定性
关于 lighttpd mod_cml, mod_magnet 的问题还可以看一眼这个:
lighttpd: from a Feature Request
ps:
忘了说, 这个东西编译当然需要 libmemcached
ps2:
课后题: 这个东西和 nginx, lighttpd 的解决方案有什么本质上的不同?
Tags: apache, lighttpd, memcached
Permalink
August 8, 2007 at 09:27
下面把lighttpd送进笼子里.
(准确说还是把php送进去)
主要大难点: mysql, extension(如果有装的话)
似曾相识:
mkdir /webroot/{var/run/lighttpd,var/run/cache ,var/log/lighttpd ,var/www/localhost/htdocs} -p
mkdir /webroot/{usr/lib64,bin,usr/bin,lib64,dev,etc,tmp} -p
非64位的同学把lib64改成lib即可
64bit only:
cd /webroot
ln -s lib64 lib
cd usr
ln -s lib64 lib
cd /webroot
Read the rest of this entry »
Tags: lighttpd, security
Permalink
July 22, 2007 at 09:20
性能永远是个大问题,lighttpd也不例外.
Request: mod_rewrite check if file exists (like mod_rewrite in apache)
大意是用这样的rewrite,
实现如果没有文件,lighttpd调用mod_fastcgi,
同时运行php脚本生成(当然一并显示出来),
如果有文件则直接输出,利用lighttpd的高性能.
"/(.+)/?$" => "index.php?name=$1",
于是有人就拿出了自己的修改版mod_rewrite,重新编译/用预编译版即可在lighttpd上使用.
但是,这个问题远未结束,
显然这样的模块修改不会进入lighttpd的mainline.
Read the rest of this entry »
Tags: lighttpd
Permalink
July 11, 2007 at 13:15
很简单的.仅仅3行而已.
$HTTP["useragent"] =~ "^InetURL" {
url.access-deny = ( "" )
}
顺便一点小提示.
这些东西直接写进另外一个配置文件里
然后在lighttpd.conf里面include就可以了,
能够省些地方.
不过偶现在仍然不知道如何仅仅通过user-agent判断扫描器,
或是个人伪装的下载器.
Read the rest of this entry »
Tags: lighttpd
Permalink
June 26, 2007 at 21:23
如果凑不出3种方法偶果然就不会发出来了…
1 Apache – mod_xsendfile
2 nginx – X-Accel-Redirect
3 lighttpd(lighty) – x-sendfile/X-LIGHTTPD-send-file
4 使用方式
5 需要注意的安全问题
Read the rest of this entry »
Tags: apache, lighttpd, web
Permalink
June 13, 2007 at 17:40
对服务器而言最重要的就是优化了.
apache的优化文章,相信你也见过不少了.
这里稍微摘出lighttpd的几个优化参数看一看.
本文主要为跑php(fastcgi)的lighttpd设置.
如果需要跑静态页面,可以忽略本文 keep-alive 部分(并调大常连接数)
1 最大连接数
默认是1024
修改 server.max-fds,大流量网站推荐2048.
因为lighttpd基于线程,而apache(MPM-prefork)基于子进程,
所以apache需要设置startservers,maxclients等,这里不需要
Read the rest of this entry »
Tags: lighttpd, optimization
Permalink
March 11, 2007 at 11:30
Before Read:
这里测试的不是apache+mod_php和lighttpd+fastcgi+php
所以,apache,lighttpd的性能差距只有不到10%.
在apache下,mod_php提供更好的稳定性,
只因公平起见,apache,lighttpd都使用fastcgi.
下面是lighttpd,apache比较正文.
好久没配过apache了,整天跟lighttpd打交道.
一直不是很喜欢apache的mod_php,这次fastcgi使用了mod_fcgid(国人作品)
测试环境:
gentoo linux 2006.1
apache 2.2(mpm-worker)+mod_fcgid
lighttpd 1.4.11(以前的说明)+mod_fastcgi
php 5.1.6(fastcgi)+pecl apc
测试文件:
phpinfo
性能总结:
lighttpd和apache差距不明显.<10%
测试结果:
Read the rest of this entry »
Tags: apache, lighttpd, php
Permalink
October 1, 2006 at 19:13
1 lighttpd 基于线程 – apache现在也有了.
但即便如此,apache loadavg仍然高高在上.
2 lighttpd 有不错的fastcgi支持 – 和apache的mod_php相比速度略快一点
但是,fastcgi(php-cgi)也不是没有缺点的.
所以lighttpd像这样的设置比较必要:
Read the rest of this entry »
Tags: lighttpd
Permalink
August 4, 2006 at 08:40
Tags: lighttpd, notes
Permalink
Enter your password to view comments