configurationapache2.conf

上周我买了一个叫做SP的OVH专用服务器。 我无法正确configuration它。

我的参数是:

内存32 GB内核4线程8硬盘驱动器2x 120GB固态硬盘连接100 Mbps

有关专用服务器的更多信息,请在此处input链接描述

我的apache2.conf文件:

<IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0 </IfModule> <IfModule mpm_worker_module> StartServers 2 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxClients 150 MaxRequestsPerChild 0 </IfModule> 

当网上stream量超过500人时,我的页面( 链接 )错误,但是服务器正常。 我用wp快速caching使用wordpress 3.2。

Cpu <1-10%,内存<2 GB,Disck busy <1-10%连接14Mbps

我安装了页面速度(Google)我禁用了mod:headers,mod_authz,expires,deflate,setenvif,autoindex

当stream量超过500个用户时

根据你的configuration,你的MaxClient设置为150.检查你是否在Apache错误日志中打了你的MaxClients限制,这取决于你的发行版在几个地方:

  • 在/ var /日志/的httpd / error_log中
  • /var/log/apache2/error.log

如果你打MaxClients和你的服务器不是最大的资源,那么提高限制可能是安全的。 所有这些都需要随着时间的推移进行监控和调整,因为资源的使用在很大程度上取决于您的应用程序代码,并且不可能说'这里是32GB内存的服务器的configuration等。

你可以在这里阅读更多关于常见的Apache指令。

当stream量超过500个用户时

这是一个毫无意义的指标。

但服务器是可以的

这再次是相当无意义的。

这两个Apacheconfiguration看起来很差 – 你试图解决这个问题? 您可能需要先查看是否正在运行pre-fork或LWP服务器。 真的,你应该使用前叉。 我build议先从:

 StartServers 20 MinSpareServers 10 MaxSpareServers 20 MaxClients 300 MaxRequestsPerChild 1000 

确保你已经启用了Keepalive,超时时间为2或1。

你的PHP如何连接到networking服务器(应该是mod_php)。

我安装了网页速度(Google)

你的意思是mod_pagespeed? 为什么?

我禁用了mod:headers,mod_authz,expires,deflate,setenvif,autoindex

为什么? 把mod_deflate放回去,并configuration它来压缩所有的HTML,CSS,JavaScript和PHP输出。

把mod_headers和mod_expires放回去 – 你需要它们来正确configurationcaching – 然后configuration适当的caching。

接下来,禁用mod_pagespeed并调整您的networking服务器。

接下来安装并configuration操作码caching。

然后安装和configurationw3总caching。

一旦你已经完成所有这些运行,最好添加一个反向代理(varnish或nginx),并再次启用mod_pagespeed – 但这次调整它正确。