49.2. /etc/lighttpd/lighttpd.conf

简介:

49.2.1. max-worker / max-fds

max-worker 我一般设置为与处理器数目相同。

max-fds 最大连接数

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

49.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"
			

49.2.3. ETags

disable etags

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

49.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
			




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
关系型数据库 MySQL PHP
httpd 的坑
Httpd服务器的坑 在/etc/httpd/conf/httpd.conf中的配置信息, 有时注释到的内容仍然会生效 配置Auth时, 允许htpasswd规定的文件中的所有的用户, Require valid-uesr, 允许特定的用户Require user user1 user2 user3 .
924 0
|
机器学习/深度学习 Shell Apache
httpd.conf 配置
# # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions.
1044 0
|
Web App开发 应用服务中间件 PHP
|
JavaScript 开发工具 前端开发
|
Shell Python PHP
|
开发工具
|
缓存 安全 Ubuntu
|
开发工具