Articles of apache 2.2

Apache ProxyPass或ProxyPassMatch从代理中排除文件

我有一个VirtualHost设置代理所有请求到另一台服务器上运行的端口9000。 我拥有的 : ProxyPass / http://localhost:9000/ ProxyPassReverse / http://localhost:9000/ 我试过了: ! ProxyPass /test.html http://localhost:9000/ ProxyPass /test.html ! http://localhost:9000/ ProxyPassMatch !^/(.*\.html)$ http://localhost:9000/$1 没有一个工作… 我想排除一个文件或一组文件被代理,文档中提到了一些关于“!!指令在你不想反向代理一个子目录的情况下是有用的”,但是没有例子那种情况

Apache虚拟主机

我似乎在Apache的虚拟主机有一些麻烦。 我已经添加了127.0.0.1 www.mysite.com到我的Windows主机文件,我看到我的networking服务器罚款。 然后我将下面的代码添加到我的conf文件中,作为最后的结果,我不知道它是否重要。 NameVirtualHost * <VirtualHost *> ServerName unknown DocumentRoot "C:/xampplite/htdocs" </VirtualHost> <VirtualHost www.mysite.com> ServerName www.mysite.com DocumentRoot "C:/xampplite/htdocs/mysite" </VirtualHost> 所以我想要实现的是去www.mysite.com将带来/ mysite文件夹和其他任何 – 或只是去127.0.0.1将默认回到主htdocs文件夹。 但事实并非如此。 这一切都结束了mysite文件夹。 查看错误日志这发生在启动: [Tue Sep 13 19:45:08 2011] [error] VirtualHost _default_:443 — mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results 为了logging我听港口80和跛脚,1337。

在端口443上添加多个VirtualHost时出现警告 – “_default_ VirtualHost在端口443上重叠,第一个优先”

我正在运行Ubuntu 12.10,并且在/etc/apache2/apache2.conf有以下4个VirtualHost条目 这4个VirtualHost条目用于2个独立的站点, test2.example.com和test2.example.com ,其中一个用于HTTP,一个用于HTTPS。 <VirtualHost *:443> DocumentRoot /var/www/test ServerName test.example.com # Other settings goes here </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/test ServerName test.example.com # Other settings goes here </VirtualHost> <VirtualHost *:443> DocumentRoot /var/www/test2 ServerName test2.example.com # Other settings goes here </VirtualHost> <VirtualHost *:80> DocumentRoot /var/www/test2 ServerName test2.example.com # Other settings goes here </VirtualHost> 我的问题当我保存并重新启动Apache,我得到这个警告: – […]

如何在apache2下启用HTTP压缩?

我如何configurationApache2来支持HTTP压缩 ?

Apache命名为带有通配符的虚拟主机

我想将www.example.com映射到特定的虚拟主机,然后我希望example.com的所有其他子域都转到另一个虚拟主机。 为此,我创build了这些主机: <VirtualHost *:80> ServerName www.example.com </VirtualHost> <VirtualHost *:80> ServerName example.com ServerAlias *.example.com </VirtualHost> 现在select哪个主机服务似乎是随机的。 如果我重新启动Apache有时我会得到一个主机和其他时间。 我究竟做错了什么? 谢谢! 更新:如果我在这个configuration上运行apache2ctl -S,我得到这个输出: VirtualHostconfiguration: 通配符NameVirtualHosts和_default_服务器: *:80是NameVirtualHost 默认服务器www.example.com(/ etc / apache2 / sites-enabled / dev:3) 端口80 namevhost www.example.com(/ etc / apache2 / sites-enabled / dev:3) 端口80 namevhost example.com(/ etc / apache2 / sites-enabled / dev:22) 经过大量的挖掘,我决定禁用我运行的低级单声道应用程序,并注意它开始从正确的站点提供文件。 他们确实需要按顺序input: <VirtualHost *:80> […]

使用SSL会造成显着的性能下降吗?

我正在尝试决定是否将SSL用于Web应用程序。 它不处理信用卡或财务数据,但它存储的信息应该是私人/社会的原因。 也有通常的用户注册和loginfunction,可能应该保护。 我知道SSL会有一些性能下降,因为服务器和客户端都有encryption和解密。 另外,据我所知,encryption的数据不会压缩太多,所以Apache的mod_deflate可能不会工作。 performance可能有多大? 我打算做一些testing,但是我会对任何基于经验的评论感兴趣。

我如何使用SPDY支持来对我的网站进行基准testing?

我目前在我的服务器上运行了大量的configuration基准,使用siege ,我想尝试SPDY协议(使用Apache的mod_spdy) – 但是siege使用HTTP。 你知道有什么工具可以让我比较我的网站在一个高度并发的环境中和没有SPDY的性能吗?

如何将2个不同的域指向1个IP地址(Apache)?

我有两个不同的域名,我想托pipe在同一个私人托pipe,我有。 我希望他们指向相同的IP地址,但有不同的内容(当然)。 我怎样才能做到这一点? 有没有不同的方法来做到这一点? 那么最好的办法是什么? 谢谢。

所有选项都必须以+或 – 开头,否则选项可能会

我有一个.htaccess文件中的这一行 Options +SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch Indexes -Indexes 我收到以下错误: Either all Options must start with + or -, or no Option may. 我如何解决这个问题,仍然做同样的事情? 更好的是,这条线是做什么的,甚至是需要的?

阿帕奇崩溃; “系统中打开的文件过多”

我在MediaTemple(dv)服务器上使用mpm_prefork运行Apache2。 最近我的服务器configuration没有发生重大变化。 httpd.conf目前设置如下: MaxKeepAliveRequests 200 KeepAliveTimeout 15 <IfModule prefork.c> StartServers 10 MinSpareServers 10 MaxSpareServers 10 MaxClients 200 MaxRequestsPerChild 4000 </IfModule> 但是在apache崩溃之前,我收到以下错误: [Thu Jun 04 18:30:24 2009] [warn-phpd] mmap cache can't open /var/www/vhosts/mydomain.com/httpdocs/filename.php – Too many open files in system (pid 19873) 我感到恼火与保姆服务器重新启动它当Apache崩溃。 帮帮我?