Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 在Httpd.conf(Amazon AWS EC2)中找不到Httpd配置值_Linux_Wordpress_Apache_Amazon Web Services_Amazon Ec2 - Fatal编程技术网

Linux 在Httpd.conf(Amazon AWS EC2)中找不到Httpd配置值

Linux 在Httpd.conf(Amazon AWS EC2)中找不到Httpd配置值,linux,wordpress,apache,amazon-web-services,amazon-ec2,Linux,Wordpress,Apache,Amazon Web Services,Amazon Ec2,我正在使用免费的AmazonAWSEC2微实例并托管一个Wordpress站点。由于内存太低,我总是会遇到一些常见错误,比如“建立数据库时出错”,从日志中我可以看到http进程占用了内存,这导致web服务停止 我已经调整了MySQL配置文件,现在我想调整http配置。我喜欢在httpd.conf中应用以下内容 Timeout 30 KeepAlive On MaxKeepAliveRequests 50 KeepAliveTimeout 10 <IfModule prefork.c>

我正在使用免费的AmazonAWSEC2微实例并托管一个Wordpress站点。由于内存太低,我总是会遇到一些常见错误,比如“建立数据库时出错”,从日志中我可以看到http进程占用了内存,这导致web服务停止

我已经调整了MySQL配置文件,现在我想调整http配置。我喜欢在httpd.conf中应用以下内容

Timeout 30
KeepAlive On
MaxKeepAliveRequests 50
KeepAliveTimeout 10

<IfModule prefork.c>
    StartServers          3
    MinSpareServers       2
    MaxSpareServers       5
    MaxClients            10
    MaxRequestsPerChild   1000
</IfModule>
超时30
继续
MaxKeepAliveRequests 50
暂停10分钟
StartServers 3
MinSpareServers 2
MaxSpareServers 5
MaxClients 10
MaxRequestsPerChild 1000
但由于某种原因,我无法在文件中找到上述信息。我需要手动添加它吗?它在别的地方吗?我试图在另一个文件夹中找到它,但什么也找不到。顺便说一下,我不是一个Linux迷。我非常感谢您的指导


我的Linux版本是Amazon Linux AMI 2016.03版。谢谢。

对于您来说,最好的办法是在重新启动后添加配置文件并监控
httpd

主配置文件:

- /etc/httpd/conf/httpd.conf
/etc/httpd/conf.modules.d/00-mpm.conf
加载的其他配置文件:

- conf.modules.d/*.conf
- conf.d/*.conf
MPM配置文件:

- /etc/httpd/conf/httpd.conf
/etc/httpd/conf.modules.d/00-mpm.conf
您找不到该部分,因为Amazon使用默认配置。将代码添加到此文件末尾:

<IfModule prefork.c>
 StartServers 3
 MinSpareServers 2
 MaxSpareServers 5
 ServerLimit 10
 MaxClients 10
 MaxRequestsPerChild 100
</IfModule>

来源:

OK,让我把它放在
httpd.conf
文件中,看看它是如何运行的。只是为了检查放置的位置是否正确。对于普通linux,它的位置通常是
/etc/httpd/conf/httpd.conf
,您最终找到了一个好的调整吗?你也可以分享你的mysql配置文件或任何链接来了解如何使用?所有这些调整是否给了您一个好的结果?