Articles of apache 2.2

Apache:处理数千个永久redirect的最佳方式是什么?

我们有一个3000 301redirect列表。 我们需要帮助 最好的地方放什么? 这似乎把这些3000行内的虚拟主机在httpd.conf将是一团糟。 build议如何处理数千个url? 它会影响页面加载速度和Apache服务器负载多less? 谢谢。

debuggingnginxconfiguration文件的最佳方法?

我有一堆重写规则,我必须从Apache端口到Nginx。 这是一个相当痛苦的过程,因为我无法看到我的重写规则和“是否”条件正在按照我的要求工作。 Apache确实已经为其重写模块进行了debugging。 我能为nginx做些什么?

在VirtualHost上下文中的_default _:*和*:*之间的区别

我想知道VirtualHost上下文中的“ default :*”和“*:*”之间的区别。 <VirtualHost _default_:*> #… ServerName host.example.com #… </VirtualHost> <VirtualHost *:*> #… ServerName host.example.com #… </VirtualHost> 我不知道使用的差异和porpouse。 THK

Apache + Tomcat有问题沟通。 不清楚的错误消息。 将网站托pipe在Tomcat下

build立: Fedora 8 Apache 2.2.8 Tomcat 5.5.8 Apache使用AJP转发请求。 问题: 经过一段时间(一点也不固定,可能在一两个小时之间,或一天或多天),Tomcat就会下降。 要么停止响应,要么放置通用的“Service Temporarily Unavailable”。 诊断: 有两台服务器具有相同的设置。 其中一个拥有较高的stream量网站(每秒几个请求),另一个拥有较低stream量的网站(每几分钟有less数几个请求)。 这两个网站是完全不同的代码库,但他们展示类似的问题。 在第一台服务器上,当问题发生时,所有线程缓慢地开始占用,直到达到极限(MaxThreads 200)。 此时服务器不再响应(并在很长一段时间后出现服务不可用页面)。 在第二台服务器上,当问题发生时,请花费很长时间,完成后您将看到的是服务不可用页面。 除了提到MaxThreads问题之外,Tomcat日志并不表示任何可能导致此问题的具体问题。 但是,在Apache日志中,我们看到了涉及AJP的随机消息。 下面是我们看到的一个随机消息的样本(没有特定的顺序): [error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header [error] (104)Connection reset by peer: ajp_ilink_receive() can't receive header [error] proxy: AJP: disabled connection for (localhost) [error] ajp_read_header: ajp_ilink_receive failed [error] […]

为SERVERconfiguration的RSA证书不包含与服务器名称匹配的ID

我最近启动了一个LAMP服务器(所有最新版本)w / WordPress上,我试图安装我最近购买的SSL证书。 当我重新启动apachectl ,error_log给我这个: [Tue Feb 25 01:07:14.744222 2014] [mpm_prefork:notice] [pid 1744] AH00169: caught SIGTERM, shutting down [Tue Feb 25 01:07:17.135704 2014] [suexec:notice] [pid 1765] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Tue Feb 25 01:07:17.217424 2014] [auth_digest:notice] [pid 1766] AH01757: generating secret for digest authentication … [Tue Feb 25 01:07:17.218686 2014] [lbmethod_heartbeat:notice] [pid 1766] […]

在同一个VirtualHost上服务http(端口80)和https(端口443)

我需要在Apache上设置我的VirtualHost服务于http和https(使用标准端口) 如果我启用SSL引擎(如下所示) – 在端口80上出现错误。 原因是,部分站点需要SSL,但其他部分则不需要。 我怎么能在网站上同时服务http + https? 这是我的虚拟主机文件…. NameVirtualHost * <VirtualHost *> ServerAdmin webmaster@localhost ServerName mysite.co.uk DocumentRoot /var/www/mysite/public <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/mysite/public> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from […]

我如何让SELinux在同一个文件夹上允许Apache和Samba?

在configuration我有设置我希望允许桑巴和Apache访问/ var / www我能够设置一个上下文来允许桑巴访问,但然后httpd没有访问权限。 使用setenforce来消除问题,所以我知道它是SELinux。 另外:如何查看文件夹的上下文,以及文件夹是否可以有多个上下文? (CentOS的)

Apache文件协商失败

我在使用Apache 2.2.22 + PHP 5.4.0的主机上遇到以下问题 我需要在用户发出请求时提供文件/home/server1/htdocs/admin/contents.php http://server1/admin/contents ,但是我在服务器error_log上获得了这个消息。 Negotiation: discovered file(s) matching request: /home/server1/htdocs/admin/contents (None could be negotiated) 请注意,我已启用mod_negotiation并在相关虚拟主机的选项中包含MultiView: <Directory "/home/server1/htdocs"> Options Indexes Includes FollowSymLinks MultiViews Order allow,deny Allow from all AllowOverride All </Directory> 我也使用mod_rewrite ,以下.htaccess规则: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^\./]*)$ index.php?t=$1 [L] </IfModule> 这似乎很奇怪,但在PHP 5.3.6相同的盒子,它曾经正常工作。 我只是想升级到PHP 5.4.0,但我无法解决这个谈判问题。 任何想法,为什么Apache不能匹配contents.php时要求的content […]

“AH00485:记分牌已满,MaxRequestWorkers没有”的含义是什么?

我的环境 CentOS 6.4 X86_64 Apache 2.4.4 PHP 5.4.16(FPM) 2个Intel Xeon E5-2620 @ 2.00GHz(8核,每个处理器16个线程) 48GB RAM注册内存。 3硬盘15RPM 145GB在RAID0(由BIO 有趣的variables <IfModule mpm_event_module> StartServers 2 ThreadLimit 196 MinSpareThreads 96 MaxSpareThreads 192 ThreadsPerChild 96 MaxRequestWorkers 192 MaxConnectionsPerChild 96 </IfModule> Apache服务器状态 服务器版本:Apache / 2.2.4(Unix)OpenSSL / 1.0.1e mod_fastcgi / mod-fastcgi-SNAP-0910052141 服务器内置:2013年5月24日16:48:07 现在时间:星期一,17-Jun-2013 09:48:11 COT 重新开始时间:星期一,17-Jun-2013 08:35:14 COT 父服务器configuration。 一代:1 父级服务器MPM生成:0 服务器正常运行时间:1小时12分57秒 […]

Apache:SSLCertificateKeyFile:文件不存在或为空

我正在为Apache 2configurationSSL。 我的系统是Ubuntu Server 10.04 LTS 。 在我的虚拟主机configuration中,我有以下与SSL有关的设置: SSLEngine On SSLCertificateKeyFile /etc/ssl/private/server.insecure.key SSLCertificateFile /etc/ssl/certs/portal.selfsigned.crt (附注:我正在使用.insecure作为密钥文件,因为该文件不是密码保护的,而且我想清楚地看到它是一个不安全的密钥文件) 所以,当我重新启动Apache,我得到以下消息: Syntax error on line 39 of /etc/apache2/sites-enabled/500-portal-https: SSLCertificateKeyFile: file '/etc/ssl/private/server.insecure.key' does not exist or is empty Error in syntax. Not restarting. 但文件在那里,并不是空的(实际上它包含一个私钥): sudo ls -l /etc/ssl/private/server.insecure.key -rw-r—– 1 root www-data 887 2012-08-07 15:14 /etc/ssl/private/server.insecure.key sudo ls -ld /etc/ssl/private/ drwx–x— […]