Articles of apache 2.2

如何configurationApache与mod_cache和mod_proxybalance大量虚拟主机

我有一个IIS服务器场,它提供类似于域停放站点,有数千个域分配给系统,并且dynamic地生成内容。 我需要一个负载平衡和caching解决scheme。 我的意图是使用Apache 2.2与mod_cache和mod_proxybalance来完成这一点。 我之前使用Apache的经验相当有限,通常只处理几个基于名称的虚拟主机。 我从来没有实现负载平衡或代理。 在研究一个configuration的同时,我还在摸索着一些基本的configuration指令,我不知道如何configuration这个环境。 尤其是,apache文档给出了关于不正确configurationServerName指令的可怕警告。 在这种情况下,我不知道如何处理这个。 该网站没有提供自己的内容,而是caching和代理内容。 我不能把每个域名放入独立的virutalhost指令。 在这种情况下,甚至需要ServerName(或其他似乎需要域名的指令)的指令吗? 编辑: 如果你想提出其他解决scheme,我向他们开放。 到目前为止,已经提出了ngnix,但ngnix不能代理基于名称的虚拟主机,因为它的代理代码只使用http 1.0到后端服务器。 我也不能确定它是否可以caching基于名称的虚拟主机。 清漆看起来像一个可能的caching解决scheme,但我真的很喜欢我可以托pipe在同一台服务器上,所以我不需要为每个function多个服务器。

美国和英国客户的HTTP响应时间差异很大

我正在调查一些在美国托pipe的图片,有些用户的加载时间确实很慢。 这个图像,例如; http://opencirrus-g0805.hpl.hp.com/books40/UMICH/2160/10/47/23/59/216010472359/SCALE/sp3031.jpg 从美国的数据中心使用apache bench ab; Server Hostname: opencirrus-g0805.hpl.hp.com Document Path: /books36/IA/2160/40/00/01/15/216040000115/SCALE/sp0831.jpg Document Length: 62604 bytes Failed requests: 0 Requests per second: 1666.38 [#/sec] (mean) Time per request: 6.001 [ms] (mean) Transfer rate: 102405.91 [Kbytes/sec] received from another box in the dc; Requests per second: 1847.39 [#/sec] (mean) Time per request: 5.413 [ms] (mean) Transfer […]

为什么我得到这个错误

* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 184.106.238.30 for ServerName … waiting apache2: Could not reliably determine the server's fully qualified domain name, using 184.106.238.30 for ServerName …done. 我正在安装一个rails应用程序teambox,这里是我的虚拟主机 <VirtualHost *:80> DocumentRoot /var/www/teambox/public ServerName www.something.com <Directory /var/www/teambox/public> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow […]

Apache,内存不足

我经常收到以下消息: 我想这是因为我没有足够的内存。 它是否正确 ? 有什么我可以做的吗? 谢谢 更新 :我已经安装了MPM prefork <IfModule mpm_prefork_module> StartServers 5 MinSpareServers 5 MaxSpareServers 10 MaxClients 150 MaxRequestsPerChild 0

使用Apache 2.2进行后端健康检查(可能吗?)

我们有几台服务器在运行Apache 2.2和Weblogic实例。 我想知道是否Apache与mod_proxy或mod_weblogic可以做后端健康检查,重点放在响应时间? 当某些后端的响应时间很长时,Apache 2.2是否可以切换到另一个实例? 我想最好的方法是使用Varnish或Apache Traffic Server,但现在我们尝试着看Apache 2.2。

保护Apache目录只允许通过服务器上的链接访问

我有一个HTML页面(在运行Apache的服务器上),它基本上包含了在同一台服务器上的VirtualDirectories中的其他HTML / PHP页面的一堆链接(链接菜单)。 有没有办法只允许通过点击这些链接访问在“主页”链接中指定的URL,而不是通过使用一些Apache指令和/或PHP直接从浏览器书签或发布URL? 我是否需要通过“菜单页面”的POST传递某种令牌,然后检查该令牌是否具有链接的“应用程序”的有效值? 希望这个问题是有道理的。

强制脚本在Apache上运行在不同的帐户,以提高安全性?

我的客户的网站最近遭到了破坏,他们正在寻求缓解这一风险。 他们有专门的服务器运行Apache和mod_php。 该网站由三个独立的php应用程序安装在不同的文件夹(客户门户脚本,wordpress和自定义的数据库驱动的脚本)。 他们的安全审计build议将每个脚本隔离开来,这样如果其中任何一个被黑掉了,另外两个脚本就不会被污损等等。他们还build议使用fast-cgi而不是mod_php。 Suexec也被提到,虽然不清楚为什么这被推荐。 有人可以确认,如果这是有道理的,实际上是可行的/可行的。 如果是这样,那么实现所提议的安全解决scheme的最佳方式是什么?

什么导致这个301redirect循环?

我在我的Ubuntu / etc / apache2 / sites-available文件中有几个Redirect指令: Redirect 301 /rss.xml http://example.com/feed/index.xml Redirect 301 /atom.xml http://example.com/feed/atom/index.xml Redirect 301 /feed/ http://example.com/feed/index.xml Redirect 301 /feed http://example.com/feed/index.xml 据我所知,他们都正常工作。 但是,当我使用web-sniffer.net访问http://example.com/feed/index.xml时,它会返回一个指向http://example.com/feed/index.xmlindex.xml的301,然后获取redirect到http://example.com/feed/index.xmlindex.xmlindex.xml等等。 看来,其中一个模式是匹配时,我不期望它。 如果我省略了最后两个redirect,则循环停止,但是当我应该时,我不会redirect/馈送和/馈送/。 任何想法如何使这个工作正确? (我认为这个问题与这个问题有关: 无限redirect循环? )

为什么这个连接到我的Web服务器失败?

我遇到了一个奇怪的服务器访问问题,通过一个名称访问主机导致成功,而其他黑洞。 我login到qa-webapp-001.mycompany.com ,可以在三个地方findDNS: qa-webapp-001$ nslookup qa-webapp-001.mycompany.com Server: 10.10.2.1 Address: 10.10.2.1#53 qa-webapp-001.mycompany.com canonical name = qa-webapp-001.prod.mycompany.com. Name: qa-webapp-001.prod.mycompany.com Address: 10.10.2.10 qa-webapp-001$ nslookup qa-webapp-001.prod.mycompany.com Server: 10.10.2.1 Address: 10.10.2.1#53 Name: qa-webapp-001.prod.mycompany.com Address: 10.10.2.10 qa-webapp-001$ nslookup qa-webapp-001 Server: 10.10.2.1 Address: 10.10.2.1#53 qa-webapp-001.mycompany.com canonical name = qa-webapp-001.prod.mycompany.com. Name: qa-webapp-001.prod.mycompany.com Address: 10.10.2.10 从networking上的每台主机,我可以curl到该主机上运行的Web服务器,并获取索引: my-box$ curl qa-webapp-001 *SUCCESS* my-box$ curl qa-webapp-001.prod.mycompany.com *SUCCESS* […]

没有扩展和PHP处理的mod_rewriteconfiguration

我正在尝试删除扩展并启用访问,以便对“/”,“/ index”和“/index.ext”的请求都返回相同的资源。 同时,我希望每一个这样的资源都要经过一个包含页眉,页脚的PHP脚本,然后做其他处理,然后把它们作为他们请求的资源发送回客户端。 我怎样才能使用.htaccess? 即使closuresMultiView,我也碰到了一堵砖墙,每一次尝试都会导致无限的重写循环。