Articles of apache 2.2

如何保持清漆后caching填充一段时间?

我们在亚马逊的Linux上运行Varnish 3.0.2,效果很好。 对于大多数内容页面,我们有48小时的ttl,对于图像,PDF等,我们有更长的时间。 这个周末我们已经把后台调低了一些维护,所以我在本周早些时候把ttl提高到了5天。 我曾经以为caching中的任何东西都能持续使用5天,但是我们很失望,今天早上我们检查了varnishstat ,caching几乎完全是空的,清漆还在提供“找不到页面”的信息。 我知道这不是Varnishdevise的目的,但是为什么当后端closures时会重置caching? 而我又如何防止下次呢? 更新2012年6月11日 :在查看/ var / log /消息之后,我每隔3小时查看一次: Jun 9 03:56:31 idea-varnish varnishd[1128]: Manager got SIGINT Jun 9 03:56:33 idea-varnish varnishd[6708]: Platform: Linux,3.2.18-1.26.6.amzn1.x86_64,x86_64,-smalloc,-smalloc,-hcritbit Jun 9 03:56:33 idea-varnish varnishd[6708]: child (6709) Started Jun 9 03:56:33 idea-varnish varnishd[6708]: Child (6709) said Child starts 我想这是服务器崩溃,并擦除内存中的所有对象。 我只刚刚安装了-debuginfo rpm,但不确定实际上会显示更多。 我想我们可以在预定的停机时间切换回基于磁盘的存储? 或者像这样的崩溃擦拭呢?

Apache在CentOS上使用100%负载来处理con.shs。 它是什么?

作为一个背景,似乎我们的服务器已经感染了一些东西,并被用来打开大量的IP连接。 我试图追踪我们的服务器现在如何被感染了一半; 我的故事已经在398639概述了谁想要一些额外的信息。 目前的问题是我发现一个Apache命令“con.shs”,通常占用我们100%的CPU(这绝对是可能的,这与我们的服务器的妥协有关)。 我的问题是,如果有人知道“con.shs”是什么,为什么它以100%运行? Googlesearch没有返回任何可能有帮助的内容。 我们正在运行Centos 5.7 Final和Apache 2.2.3(使用PHP和MySQL)。

仅当负载平衡时,NTLM基本身份validation才会在http apache后面失败

我build立了一个Apache的http反向代理和负载均衡。 我已经知道Reverse Proxying会打破NTLM对话框,并导致类似于Active Directory的基本身份validation,这对我来说已经足够了。 NTLM在我的JBoss上被jCIFS支持,并且在以下情况下工作正常: 我直接使用我的JBoss地址( 10.1.2.12:8080/myapp ) 我没有第二个成员使用我的apache RP地址( myapp-homintranet.myorg.com/myapp ) 但是由于增加了第二个成员进行负载均衡,所以根本不起作用! <VirtualHost *:80> ServerName myapp-homintranet.myorg.com ServerAlias myapp-homintranet ProxyRequests Off ProxyPass /myapp balancer://jbosscluster/myapp stickysession=JSESSIONID nofailover=On ProxyPassReverse /myapp http://server01.myorg.com:8080/myapp #Conf load-balancing Jboss <Proxy balancer://jbosscluster> BalancerMember http://server01.myorg.com:8080 BalancerMember http://server02.myorg.com:8080 ProxySet lbmethod=byrequests </Proxy> </VirtualHost> 如果我删除第二个成员(服务器02),它再次工作。 我不知道如何解决这个问题。 有人能帮我吗 ? PS:如果有一种突出显示apache/conf语法的方法,告诉我! 我的工作人员conf ,以防万一… # Define list of workers that […]

redirect页面并添加.html扩展名

在我的conf文件中,我想将所有的URL从一个子域(blog.domain.com)重写到根域,删除尾部的斜杠(如果可用),并附加“.html”扩展名。 blog.domain.com/my-first-link/ –> www.domain.com/my-first-link.html 但是我不想为子域的根添加“.html”扩展名 blog.domain.com/ –> www.domain.com

即使启用了所有错误报告,PHP也会显示空白页面

我试图在Drupal应用程序中debugging一个破损的页面,并且很难让PHP吐出任何有用的东西。 我有以下设置: error_reporting = E_ALL display_errors = On display_startup_errors = On log_errors = On error_log = /var/log/php/php_error.log 我有一个文件显示我phpinfo()确认这些variables设置正确的环境。 我已经增加了memory_limit到256M(这应该是绰绰有余)。 然而,我得到的唯一迹象是apache访问日志中的状态500代码和PHP中的空白白页。 Apache虚拟主机将LogLevel设置为debugging,错误日志仅输出: [Sat Jun 16 20:03:03 2012] [debug] mod_deflate.c(615): [client 173.8.175.217] Zlib: Compressed 0 to 2 : URL /index.php, referer: http://ec2-174-129-192-237.compute-1.amazonaws.com/admin/reports/updates [Sat Jun 16 20:03:03 2012] [error] [client 173.8.175.217] File does not exist: /var/www/favicon.ico [Sat Jun […]

CentOS 6,Apache的mod_perlconfiguration,但无法正常工作

我刚刚收到我的dedi服务器访问,我安装了apache: yum install httpd 之后,我configuration了位于/ etc / httpd / conf中的httpd.conf,我修改了服务器名称,添加了服务器IP地址和我的电子邮件地址。 Perl已经安装,当我inputperl -v我得到: This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi 我安装了mod_perl: yum install mod_perl 我再次编辑/etc/httpd/conf/httpd.conf,我补充说: AddHandler cgi-script .cgi .pl Options +ExecCGI 至: <Directory "/var/www/cgi-bin"> AddHandler cgi-script .cgi .pl Options +ExecCGI AllowOverride None Options None Order allow,deny Allow from all </Directory> 我通过sFTP上传了一个hello world的cgi文件到/ var / www […]

gzip压缩增加了性能,最终增加了服务器的响应时间

这是我目前的服务器场景。 我在Rackspace Cloud实例(16GB内存)上运行,在CentOS 5.5安装上使用cPanel / WHM。 我目前正在运行大约10个Magento站点,大小各不相同(从中等大小) 随着时间的推移,我注意到网站速度放缓。 我已经对数据库和其他东西做了大量的调整,以帮助提高Magento的性能。 我最近通过为Apacheconfiguration添加以下Post Include来全局启用gzip压缩 。 <IfModule mod_deflate.c> # Insert filter on all content SetOutputFilter DEFLATE # Insert filter on selected content types only AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript # Netscape 4.x has some problems… BrowserMatch ^Mozilla/4 gzip-only-text/html # Netscape 4.06-4.08 have some more problems BrowserMatch ^Mozilla/4\.0[678] […]

Apacheredirect域

我的第二个/新(site.com)域被redirect到默认/旧域(site.ca)。 但是,当input的URL与新的域名的SSL它工作得很好。 当我用http://定期使用时,它会redirect到我的旧域(site.ca)。 我的configuration如下:非SSL: http : //pastebin.com/mkt2zuu8 SSL: http : //pastebin.com/Lc1wA5PV 我很沮丧,我花了4个多小时试图弄清楚什么是错的。 我有两个专用IP。

使用Apache2和Passenger启动Rails应用程序时显示目录根目录

我做了以下尝试使用Apache 2.2.21和Passenger 3.0.13来托pipeRails 3.2.3应用程序: 装gem乘客 rvmsudo乘客安装apache2模块 在/etc/apache2/extra/httpd-vhosts.conf中添加网站信息 在/ etc / hosts中添加了一行(不确定是否需要这样做;在Passenger文档中没有提及 取消注释掉/etc/apache2/httpd.conf中的行以包含/etc/apache2/extra/httpd-vhosts.conf 重新启动Apache 当我尝试拉起我的网站时,显示如下: Index of / Name Last modified Size Description Apache/2.2.21 (Unix) mod_ssl/2.2.21 OpenSSL/0.9.8r DAV/2 PHP/5.3.10 with Suhosin-Patch Phusion_Passenger/3.0.13 Server at lightbesandbox2.com Port 443 这里是网站的/ etc / hosts条目: 127.0.0.1 www.lightbesandbox2.com 这是我的/etc/apache2/extra/httpd-vhosts.conf条目的网站: NameVirtualHost *:80 <VirtualHost *:80> ServerName www.lightbesandbox2.com ServerAlias lightbesandbox2.com PassengerAppRoot /Users/server1/Sites/iktusnetlive_RoR/ DocumentRoot /Users/server1/Sites/iktusnetlive_RoR/public […]

Nginx反向代理IP问题

出于某种原因,Apache仍然看到我的SERVERS IP。 这是一个nginx问题吗? /etc/nginx.conf user nobody; # no need for more workers in the proxy mode worker_processes 4; error_log /var/log/nginx/error.log info; worker_rlimit_nofile 20480; events { worker_connections 5120; # increase for busier servers use epoll; # you should use epoll here for Linux kernels 2.6.x } http { server_name_in_redirect off; server_names_hash_max_size 10240; server_names_hash_bucket_size 1024; include mime.types; […]