VPS侦探论坛

 找回密码
 注册
查看: 3083|回复: 1

LNMP1.3安装包Apache2.2打开httpd.conf没找到KeepAlive

[复制链接]
发表于 2016-10-21 12:56:43 | 显示全部楼层 |阅读模式

Gtmetrix上测试了网站,建议在httpd.conf内开启KeepAlive。

于是:

# find / -name httpd.conf
/usr/local/apache/conf/original/httpd.conf
/usr/local/apache/conf/httpd.conf


但是无论vi哪个都找不到KeepAlive。

请问,什么原因呢?

谢谢!

[ 本帖最后由 ifrederick 于 2016-10-21 12:58 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2016-10-21 14:30:23 | 显示全部楼层

回复 1# 的帖子



搞定了。解决方法列在下面,方便以后的朋友参考。

因为include了httpd-default.conf,所以,执行:

vi /usr/local/apache/conf/extra/httpd-default.conf

编辑修改,保存后重启httpd。命令:

service httpd restart


P.S.: 感觉默认值不是很适合我的主机,网上查了下,自己修改如下:

KeepAlive On
Timeout 30
MaxKeepAliveRequests 100
KeepAliveTimeout 5

*****END*****

[ 本帖最后由 ifrederick 于 2016-10-21 14:34 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-3-29 07:47 , Processed in 0.025623 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表