Articles of apache 2.2

nginx反向代理到apache2的问题

我正在尝试设置一个反向代理系统,其中nginx位于前端处理来自Internet的所有请求,而apache2位于处理所有dynamic内容的后端。 我可以在基于我的域名的nginx中设置虚拟主机,但由于apache2只在127.0.0.1:8080(不面向外部),我想仍然有基于域的虚拟主机(或任何可以从nginx传递到Apache )并基于此更改dynamic内容。 基本上,我有一个nginxconfiguration在sites_available和sites_enabled基本上说,位置/ {proxy_pass http://127.0.0.1:8080/ ;}。 所以目前我不认为有任何方法来检测我们在外面的apache的域名。 我几乎完全按照这个指南设置它: http : //tumblr.intranation.com/post/766288369/using-nginx-reverse-proxy所以代码和其他人几乎是相同的。 有人有主意吗? 贾森

为什么ModSecurity无法访问数据目录?

更新我想我们已经解决了这个问题。 这个问题似乎是/ modsec_storage目录的SELinux上下文types的值不正确的结果。 但是,我们仍然不确定,因为虽然在更改SELinux上下文types值后,Apache能够在全局和ip集合(global.dir / global.pag和ip.dir / ip)的目录中创build文件。 pag),新文件仍然有零字节。 我是ModSecurity的新手,不确定这些文件是否为空,因为configuration有问题,或者ModSecurity只是简单地确定在每个事务结束后不需要永久存储IP地址。 任何人都可以在这里提供指导? 我最近在我们的生产服务器上安装了ModSecurity(v2.5.12 / CRS v2.0.8),除了这些写入Apache错误日志的错误之外,一切都很好。 Failed to access DBM file "/modsec_storage/global": Permission denied [hostname "www.internationalstudent.com"] [uri "/includes/soc_bookmarks/images/delicious.png"] [unique_id "LZ6jc38AAAEAAFO6408AAABO"] Failed to access DBM file "/modsec_storage/ip": Permission denied [hostname "www.internationalstudent.com"] [uri "/includes/soc_bookmarks/images/delicious.png"] [unique_id "LZ6jc38AAAEAAFO6408AAABO"] 按照Ivan Ristic的ModSecurity手册中的文件权限设置说明,没有成功,我创build了/ modsec_storage目录,将所有者和组设置为apache,并将目录权限recursion设置为777。 但是,ModSecurity仍然报告相同的权限错误,所以我很难过。 谁能告诉我如何解决这个问题?

与Apache mod_proxy热备份(或等效)502错误

任何人都知道如何configuration热备用(+ H)mod_proxyfunction,以便在closures期间立即发生接pipe(即使没有一个用户接收502)错误? 我们不是在寻找真正的负载均衡,我们只是希望辅助服务器在我们closures主服务器的时候接pipe。 问题是,无论什么时候主服务器出现故障,我都可以在第二台服务器实际接pipe之前,发送一个无效的请求,导致502 HTTP错误到达terminal用户。 Listen 80 <VirtualHost 127.0.0.1:80> ServerName domain.com ProxyPass / balancer://balance/ <Proxy balancer://balance/> BalancerMember http://primary_ip:80 BalancerMember http://secondary_ip:80 status=+H </Proxy> </VirtualHost>

Apache mod状态显示..读取

最近我的apache得到了DoS攻击,它发生了攻击者泛滥的SYN请求到我们的apache,我知道是因为那时我已经启用了wireshark。 攻击完成后,我重新启动我的Apache和它的全部运行正常。 但是,当我从mod-status检查我的serverstatus时出现了一些线程正在显示的问题 > 0-92 61968 0/0/674 R 1125 0 0.0 0.00 22.93 ? ? ..reading.. > 0-92 61968 0/0/29 R 537889 0 0.0 0.00 0.01 ? ? ..reading.. > 0-92 61968 0/0/852 R 1158 15 0.0 0.00 15.05 ? ? ..reading.. > 0-92 61968 0/0/2 R 537933 578 0.0 0.00 0.02 ? ? ..reading.. […]

在zend服务器上的虚拟主机问题(CE)

我想在zend服务器ce上安装虚拟主机,但得到以下错误: Forbidden You don't have permission to access / on this server. 这是我的虚拟主机configuration如下所示: <VirtualHost *:80> ServerName stage5local DocumentRoot K:/stage5/public_html <Directory K:/stage5/public_html> DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> 我在我的httpd.conf中取消了注释: Include conf/extra/httpd-vhosts.conf 我已经添加stage5local到我的主机文件。 我做了所有这一切后,我重新启动了我的Apache服务器。 我在Windows XP上运行。 有任何想法吗? 是否因为k:/ stage5不在我的webroot中?

X11为Apache用户

我们正在使用inkscape通过Web表单将上传到我们的服务器的SVG图像转换成。 对于这个inkscape通过-z选项提供了一个批处理模式,但是这个批处理模式有一个缺陷:当inkscape用户运行inkscape ,它会打断 $ inkscape -z -W drawing.svg X11 connection rejected because of wrong authentication. The application 'inkscape' lost its connection to the display localhost:11.0; most likely the X server was shut down or you killed/destroyed the application. 如果你像普通用户那样做,你也会遇到错误: Xlib: connection to "localhost:11.0" refused by server Xlib: PuTTY X11 proxy: MIT-MAGIC-COOKIE-1 data did not match […]

在我的web服务器上启用RFC 5746(TLS重新协商指示扩展)有什么缺陷?

在我的apache + opensslconfiguration上启用RFC 5746(TLS Renegotiation Indication Extension)可以吗? 如果启用此扩展程序,我将无法支持哪些浏览器/客户端?

拉着水银回购 – 获得406

我在Ubuntu机器上安装了Redmine,并创build了一个使用Mercurial作为版本控制的项目。 Redmine应用程序是我的Apacheconfiguration的根。 所以redmine.domain.com直接进入用户login的Redmine安装等。 我在/var/www/redmine/merc/创build了一个仓库。 当我将其设置为Redmine项目的根目录时,Redminefind它并在存储库选项卡下显示我的文件和版本。 我想要做的是把这个存储库到我的本地机器运行Windows 7.我安装TurtoiseHg,它进展顺利。 现在,当我试图拉开 http://redmine.domain.com/merc/ 我找不到404。 当我试图从中拉 http://redmine.domain.com/projects/project1/repository 我得到406命令中止! 我应该如何设置? 我查看了Apache的configuration文件,但是我没有看到任何会暗示外部请求被中止的事情。

关于256M RAM服务器上的MPM Prefork MaxClient参数

我有一个关于VPS服务器上的Apache MPM Preforkconfiguration的问题。 一个slicehost文章,他们build议将MaxClients设置为40,如果我的虚拟服务器上有256MB RAM的话。 ( http://articles.slicehost.com/2010/5/20/configuring-the-apache-mpm-on-debian ) 但是,由于每个客户端请求使用大约50MB RAM内存,交换是保证和我的VPS减慢。 PID RSS COMMAND 10146 45944 /usr/sbin/apache2 -k start 10147 52528 /usr/sbin/apache2 -k start 10150 49680 /usr/sbin/apache2 -k start 10151 48756 /usr/sbin/apache2 -k start 我发现,如果我将MaxClients设置为4(!),我不会进行任何交换,并且networking服务器应该更快(或者我错了吗?) 所以,我不明白他们为什么build议40。 谢谢

为每个目录级别启用mod_deflate

我正在使用下面的代码,当我访问网站时,它只压缩所有在/ abc下的所有URLpath的jsp,但它忽略了所有的js和css文件。 我想要在/ abcpath中的所有子文件夹下压缩js和css文件? 我如何做到这一点。 谢谢! <LocationMatch "/abc"> <IfModule mod_deflate.c> SetOutputFilter DEFLATE # Don't compress images SetEnvIfNoCase Request_URI \ \.(?:gif|jpe?g|png)$ no-gzip dont-vary #Don't compress PDFs SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary #Don't compress compressed file formats SetEnvIfNoCase Request_URI \.(?:7z|bz|bzip|gz|gzip|ngzip|rar|tgz|zip)$ no-gzip dont-vary <IfModule mod_headers.c> Header append Vary User-Agent </IfModule> </IfModule> </LocationMatch>