Articles of apache 2.2

套接字文件描述符(1063)大于FD_SETSIZE(1024),则可能需要使用更大的FD_SETSIZE

我的Apache抛出内部服务器错误500错误和日志是这样的: > [Sun Apr 07 23:35:24 2013] [error] [client 124.162.30.45] (2)No such > file or directory: FastCGI: failed to connect to server > "/home/magda_00aa/sportxxx.pl/sportxxx.pl.0fake": socket file > descriptor (1063) is larger than FD_SETSIZE (1024), you probably need > to rebuild Apache with a larger FD_SETSIZE, referer: > http://www.surf4web.com/surfing.php?id=haoduodeng2012 我已经提高了内部的FD限制: cat /usr/include/bits/typesizes.h | grep FD #define […]

越来越多的TIME_WAIT连接会影响服务器的性能吗?

我有两台运行RHEL 6的服务器,一台用于Apache 2.2,一台用于memcached(memcached-1.4.4-3)。 我注意到Apache服务器上的TIME_WAIT连接数量有所增加 netstat -n | grep 11211 | awk '{print $6}' | sort | uniq -c 1 ESTABLISHED 807 TIME_WAIT 而且这个数字还在增加。 TIME_WAIT是否意味着它仍然被使用? 增加的数字是否会影响服务器的性能? 我怎样才能摆脱他们?

Arch Linux下的systemd httpd stop很慢

当我执行一个: systemctl stop httpd Apache经常需要几分钟的时间来停止 命令: apachectl gracefully-stop 总是立即停止。 任何人有任何想法可能会导致这个? 命令: systemctl start httpd 和 apachectl start 都跑得很快。 不知何故,这是systemd和停止httpd相关(可能与Arch Linux相关)。

使用Apache的Active Directory身份validation:为什么我需要使用全名(域用户)?

我们使用Apache 2.2对Active Directory进行身份validation。 configuration如下: AuthFormLDAPURL "ldap://*.*.*.*:389/DC=domain,DC=com?userPrincipalName,sAMAccountName?sub?(objectClass=*)" 注意:以下使用WireShark的所有跟踪。 当CN等于sAMAcountMame名称时,我定义了用户john: 我只能使用john(sAMAcountMame)进行身份validation。 请在下面findLDAP绑定请求: LDAP绑定响应: 然后,当CN不等于sAMAcountMame名称时,我定义了用户johnd: 不幸的是,我无法使用johnd(sAMAcountMame)进行身份validation。 请在下面findLDAP绑定请求: LDAP绑定响应: 我可以使用全名[email protected]进行身份validation。 请在下面findLDAP绑定请求: LDAP绑定响应: 问题: 当CN不等于sAMAcountMame时,为什么我无法使用sAMAcountMame进行身份validation? 为什么我可以在这种情况下使用域名sAMAcountMame进行身份validation? 我们是否应该build议我们的用户总是在域中使用sAMAcountMame进行身份validation,以防止身份validation问题? 谢谢你的帮助!

如何findApache上的FcgidMaxProcesses的当前设置?

在问这个问题的时候,我觉得这可能是愚蠢的 – 但我现在还不知道。 如何findApache上的FcgidMaxProcesses的当前设置? 背景 我遇到以下错误:mod_fcgid:无法应用进程槽… 根据mod_fcgid文档 ,我的Apache2允许MaxClients = 500,而FcgidMaxProcesses的默认configuration是1000。 因此,MaxProcesses不应该成为限制因素 – 但是在开始使用这些设置之前,我宁愿检查当前的值。 所以……我怎么样? 谢谢 设置 # apache2.conf <IfModule mpm_worker_module> StartServers 2 ServerLimit 32 MinSpareThreads 25 MaxSpareThreads 100 ThreadLimit 64 ThreadsPerChild 50 MaxClients 1000 MaxRequestsPerChild 10000 </IfModule> # VirtualHost configuration <IfModule mod_fcgid.c> FcgidWrapper /var/www/php-fcgi-starter .php # Allow request up to 33 MB FcgidMaxRequestLen 34603008 FcgidIOTimeout […]

为什么Apache在本地主机上暂时不能返回服务?

好,所以我有点新东西。 我试图让PHP和Apache2在我的本地主机上运行,​​我似乎无法得到它的工作。 在我的机器上inputlocalhost到chrome时,我总是收到这条消息: 服务暂时不可用 由于维护停机或容量问题,服务器暂时无法处理您的请求。 请稍后再试。 我已经find并将粘贴下面的错误日志: [Wed Jul 03 12:11:57 2013] [notice] caught SIGTERM, shutting down [Wed Jul 03 12:12:02 2013] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] httpd: Could not reliably determine the server's fully qualified domain name, using Orion.local for ServerName [Wed Jul 03 12:12:02 2013] [notice] Digest: generating secret […]

在Apache2中设置PassengerDefaultRuby

我遇到了一个服务器错误,它告诉我,它不能检测到耙子等重要的gem。 研究表明,Phusion Passenger和RVM之间存在一个错误的交stream。 RVM build议在服务器的全局configuration文件中设置PassengerDefaultRuby ,在我的情况下是/etc/apache2/apache2.conf 。 当我插入这一行: PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3/ruby 重新启动Apache时出现此错误: Syntax error on line 39 of /etc/apache2/apache2.conf: Invalid command 'PassengerDefaultRuby', perhaps misspelled or defined by a module not included in the server configuration 也许我把这个代码放在错误的文件中? 或者也许别的东西出了问题? 任何指导将不胜感激。

/ var / log / httpd上的权限

我试图安排在/ var / log / httpd被设置的权限,以便httpd可以写在那里的日志文件,但我似乎无法使其工作。 我已经编辑目录到Apache:apache,并chmod编辑它777: # ls -l /var/log […] drwxrwxrwx 2 apache apache 4096 Aug 26 15:55 httpd 那为什么heck不能将apache用户写入文件到那个目录? # sudo -u apache touch /var/log/httpd/foo touch: cannot touch `/var/log/httpd/foo': Permission denied 这里发生了什么?

SSL23_GET_SERVER_HELLO:原因(1112)问题curl7.25.0

请考虑两个curl命令: curl -v —ssl https://example.com * About to connect() to example.com port 443 (#0) * Trying 10.20.30.40… * connected * Connected to example.com (10.20.30.40) port 443 (#0) * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: none * SSLv3, TLS handshake, Client hello (1): * error:14077458:SSL routines:SSL23_GET_SERVER_HELLO:reason(1112) * Closing connection #0 curl: (35) error:14077458:SSL […]

Apache消耗太多的CPU和内存

我在使用Apache Web Server加载内存时遇到一些麻烦。 我们正在虚拟机上运行Ubuntu Server 12.04 LTS 。 我们的服务器有以下规格: 8GB内存; 4个vCPU( 12ghz ); 我们configuration服务器运行一个基于Drupal(7.23)的网站 。 所以,我们安装了Apache,PHP,MySQL …版本如下: Apache 2.2.22; PHP 5.3.10( PHP以Apache模块运行 ); APC 3.1.7; MySQL 5.5.31(所有innodb表); 我也运行一些Apache模块 。 看看( apachectl -M ): core_module(静态) log_config_module(静态) logio_module(静态) mpm_prefork_module(静态) http_module(静态) so_module(静态) actions_module(共享) alias_module(共享) authz_host_module(共享) deflate_module(共享) dir_module(共享) env_module(共享) include_module(共享) mime_module(共享) php5_module(共享) proxy_module(共享) proxy_http_module(共享) reqtimeout_module(共享) rewrite_module(共享) setenvif_module(共享) ssl_module(共享) status_module(共享) […]