编译lighttpd 1.5

为了获得压缩功能,编译1.5。注意要安装libaio,libgamin的开发库。

编译的时候,增加linux aio, fam, openssl

./configure --with-linux-aio --with-fam --with-openssl --enable-maintainer-mode


配置lighttpd.conf
#使用fam监视文件状态
server.stat-cache-engine = "fam"
#keep alive 设为30
server.max-keep-alive-requests = 30
#使用epoll的api
server.event-handler = "linux-sysepoll"
#使用linux aio,据说速度最快
server.network-backend = "linux-aio-sendfile"
server.max-request-size = 10240
server.max-fds = 2048
server.max-connections = 1024

#开启压缩
deflate.enabled = "enable"
deflate.compression-level = 9
deflate.mem-level = 9
deflate.window-size = 15
deflate.allowed_encodings = ( "bzip2", "gzip", "deflate" )
deflate.min-compress-size = 200
#deflate.sync-flush = "enable"
#deflate.output-buffer-size = 8192
deflate.work-block-size = 512
#设置压缩内容的类型
deflate.mimetypes = ("text/html", "text/plain", "text/css", "text/javascript", "text/xml")

你可能感兴趣的:(JavaScript,linux,css,lighttpd,Ruby)