/ 中存储网

CentOS系统安装配置lighttpd服务器以及优化的方法

2014-03-30 14:25:01 来源:ITJS.CN
vi /etc/lighttpd/lighttpd.conf

#通用优化设置

#server.max-worker=4

server.stat-cache-engine = "simple"

server.network-backend = "linux-sendfile"

server.event-handler = "linux-sysepoll"

server.max-keep-alive-requests = 0

server.max-keep-alive-idle=0

server.tag="Apache 2.4"

server.max-fds=60000

#etag.use-inode = "disable

#优化fastcgi,大流量并发设置

fastcgi.server             = ( ".php" =>

( "localhost" =>

(

"socket" => "/tmp/php-fastcgi.socket",

"bin-path" => "/usr/bin/php-cgi",

"max-procs" => 40,

"idle-timeout" => 20,

"bin-environment" => (

"PHP_FCGI_CHILDREN" => "9",

"PHP_FCGI_MAX_REQUESTS" => "10000"

),

"bin-copy-environment" => (

"PATH", "SHELL", "USER"

)

)

)

)

#配置虚拟主机

$HTTP["host"] == "www.server110.com" {

status.status-url = "/vstatus"

server.name = "www.server110.com"

server.document-root = "/www/www.server110.com.com"

server.errorlog = "/www/log/www.server110.com.error.log"

}

完成!