我有一个VPS服务2个虚拟主机(一个http和一个https)为同一个域设置Apache 2.4。 似乎一切工作正常除了这些一致的行在我的apache错误日志(当然不同的PID): [mpm_itk:error] [pid 31830] child died with signal 11 这些mpm_itk错误似乎以大约每小时5或6个小组的forms出现,每隔一小时发生一次: [Fri Aug 07 06:25:14.440874 2015] [mpm_prefork:notice] [pid 470] AH00171: Graceful restart requested, doing restart [Fri Aug 07 06:25:14.513782 2015] [mpm_prefork:notice] [pid 470] AH00163: Apache/2.4.10 (Debian) mpm-itk/2.4.7-02 OpenSSL/1.0.1k configured — resuming normal operations 我的设置中启用了Apache模块mpm_itk和mpm_prefork(或者这本身就是一个问题?)。我想知道是否安全只是禁用mpm_itk并重新启动Apache? 它是一个现场电子商务网站,我需要确定之前,我做任何可能会使问题变得更糟。 如果任何人有任何build议如何安全地进行,将不胜感激。 更新 好的,我已经禁用了mpm_itk并使用mpm_prefork重新启动了apache。 “mpm_itk错误”现在没有了,但是我得到了这些核心通知:“AH00052:child pid xxxxx退出信号分段错误(11)”。 有谁知道我应该看什么来最终解决这个问题?
我有一堆指向服务器(IP)的DNSlogging。 对于我想要configuration的每个网站,我都使用VirtualHost与ServerName。 但并不是所有的DNS都应该由Apache(通过find的第一个字母数字网站)来回答, 我的问题。 有没有办法,对Apache说,OK服务只有这个DNS。 ??
我的网站是http://self.hellobox.co 。 出于一些奇怪的原因,一些用户正在得到“禁止”的Apache错误。 它在我的工作很好。 所以我去了这个网站“ http://www.locabrowser.com ” – 它允许我从世界各地的不同位置截图。 有趣的是,从日本和以色列用户看起来像这样的错误,但从其他地方的网站加载罚款。 [下面的截图] 我的Apacheconfiguration文件或.htaccess文件中没有任何IP地址特定的“拒绝”规则。 我试图看看我的error.log文件,但是当这个错误发生时,没有任何logging。 我也看着我的IPTABLES规则,但没有IP地址特定的规则。 我确实启用了“fail2ban”。 有什么我应该检查吗? 还有其他的事情我可以检查得到这个工作? 仅供参考,我很久以前在我的htaccess文件中有IP地址特定块,但现在它们不在那里。 这些事情不能有任何“caching”吗? 谢谢你的帮助! 编辑 :好吧,我从error.log文件中find以下行 [authz_core:error] [pid 25724] [client 203.29.159.134:52087] AH01630:客户端被服务器configuration拒绝: 我用Googlesearch,做了我能解决的事情,但没有任何运气。 编辑2 :我一直在testing我的网站与“browserling.com”,事实certificate,无论何时用户的IP地址是IPv6我得到“禁止”的错误。 IPv4工作正常。 现在我怎么解决这个问题?
你知道在后缀(我使用的是Ubuntu 14),你可以通过postconf来获得所有当前的configuration设置 有没有办法看到Apache的所有实时configuration设置? 我可以做一个phpinfo(); 但显示所有的PHP信息和一个非常小的一组Apache的信息。 有任何想法吗? **sorting** 通过执行“a2enmod info”启用mod_info并相应地编辑conf文件 <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from 1.2.3.4 # your IP, subnet, whatever </Location> 然后在Apache重新启动后转到http:// myserver / server-info 有关mod_info的更多信息可以在http://httpd.apache.org/docs/2.2/mod/mod_info.htmlfind。
我有以下.htaccess内容: RewriteEngine On RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_URI} /+[^\.]+$ RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L] RewriteRule ^([0-9a-zA-Z_/]+)?$ index.php?vars=$1 [NC,L,QSA] 我的问题很简单,但我不知道为什么会发生: 当我访问文件时,它正常工作 当我浏览网站时,它正常工作 当我尝试访问受.htaccess保护的文件夹时,它正常工作 当我尝试访问一个公共文件夹时,它会重写URL(NOT FOR FOLDER条件是第一个) 有没有人有任何想法为什么? 编辑:重写日志 [Thu Apr 28 12:57:11.245583 2016] [rewrite:trace3] [pid 4860] mod_rewrite.c(475): [client 37.161.74.115:47510] 37.161.74.115 – – [my.website.com/sid#7fb7fcff2e38][rid#7fb7fcf5b0a0/initial] [perdir /var/www/free/] strip per-dir prefix: /var/www/free/images/ -> images/ […]
在我的networking服务器上,我有一个默认主机domain_A.tld设置为redirect到domain_B.tld。 (这是为了捕获HTTPS连接不匹配定义的主机,并将它们引用到domain_B.tld。)我最近添加了subdomain_C.domain_B.tld,或尝试与下面的VirtualHost。 subdomain_C.domain_B.tld的VirtualHost是: <VirtualHost *:443> ServerName ____ ServerAlias ____ DirectoryIndex index.cgi index.shtml index.html index.html.var DocumentRoot /____ ErrorLog /var/log/apache2/_____error.log CustomLog /var/log/apache2/_____access.log combined SSLEngine On SSLCertificateFile /etc/letsencrypt/live/____/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/____/privkey.pem SSLCACertificateFile /etc/letsencrypt/live/____/cert.pem ServerAdmin ____ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory ____> Options ExecCGI Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/____.error.log […]
在研究完文档之后,我不希望在<Directory>容器中的指令影响以下(完整)configuration中的/server-status类的非文件系统URL: DefaultRuntimeDir /var/run/apache2 PidFile /var/run/apache2/apache2.pid User www-data Group www-data ErrorLog /var/log/apache2/error.log LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined DocumentRoot /var/www/html Listen 80 LoadModule mpm_worker_module /usr/lib/apache2/modules/mod_mpm_worker.so LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so LoadModule status_module /usr/lib/apache2/modules/mod_status.so <Location /server-status> SetHandler server-status </Location> <Directory /> Require all denied </Directory> 不过,如果我在Debian上运行Apache / 2.4.25这个configuration就好了 # apache2 […]
如果我使用mod_auth_form和dbd后端,我该如何encryption密码?
我将ServerLimt设置为15,将MaxClients设置为8,但是我偶尔会看到150个Apache进程。 怎么来的? 我有Apache / 2.4.7(Ubuntu),MPM:prefork StartServers 1 MinSpareServers 1 MaxSpareServers 2 Serverlimit 15 MaxClients 8 MaxRequestsPerChild 50 在启动服务器后不久,我可以看到11个Apache进程:一个父进程和10个subprocess。 基于此,我假设10个subprocess中的8个是因为“MaxClients”设置,另外2个是由于我设置了“MaxSpareServers = 2”而产生的。 现在,进程的数量有点超过了15个。我不明白Serverlimit是如何发生的。但是,真正的问题是偶尔进程的数量会增加到150个,耗尽内存。 文档中说:“使用prefork MPM时,只有当您需要将MaxClients设置为高于256(默认值)时才使用此指令。不要将此指令的值设置为高于您可能要设置MaxClients的值。 第一句话似乎说我不应该碰它,但第二句似乎build议我应该把它与MaxClients相匹配。 底线:如果Serverlimit不起作用,我还可以如何设置对Apache进程数量的硬性限制。
我试图从Ubuntu 12.04和Ubuntu 14.04(因此从Apache 2.2到Apache 2.4)自定义Apache安装程序。 我所有的configuration文件都是在/etc/apache2-custom的包pipe理系统中单独pipe理的。 我们使用mpm-itk。 我注意到的其中一个不同之处在于它实际上是作为扩展编译的,所以我需要LoadModule它。 我有这在所有我的LoadModule指令的顶部。 LoadModule mpm_prefork_module /usr/lib/apache2/modules/mod_mpm_prefork.so LoadModule mpm_itk_module /usr/lib/apache2/modules/mpm_itk.so 一切正常,但是当我访问使用AssignUserID group1 group1的站点时,我得到一个500内部服务器错误。 看我的error.log: (itkmpm: pid=29765 uid=33, gid=33) itk_post_perdir_config(): setgid(120208): Operation not permitted 要清楚,uid / gid = 33是www-data,而setgid()是去group1。 我读这是因为我的请求进程作为非特权用户运行。 他们不应该成为根? 有些人似乎也遇到了这个问题,但都涉及CGI: build筑论坛 使用邮递员 Debian的错误