Home | Mirror | Search

2. /etc/lighttpd/lighttpd.conf

2.1. max-worker / max-fds

max-worker 我一般設置為與處理器數目相同。

max-fds 最大連接數

server.max-worker = 24
server.max-fds = 4096
			

2.2. accesslog.filename

通過cronolog切割日誌

#### accesslog module
#accesslog.filename          = "/www/logs/lighttpd.access.log"
accesslog.filename = "| /usr/local/sbin/cronolog /www/logs/%Y/%m/%d/access.log"
			

2.3. ETags

disable etags

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
static-file.etags = "disable"
			

2.4. server.tag

隱藏伺服器信息

server.tag = "Apache"
			

測試結果Server: Apache

curl -I http://172.16.0.7/
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 4692
Date: Fri, 04 Nov 2011 12:33:19 GMT
Server: Apache
			
comments powered by Disqus