我正努力使用仅仅使用HTTP返回代码来匹配Apache日志上的Fail2Ban的failregex 。 我使用的日志格式如下,在这个例子中是显示“200”的字段。 只要其他领域(以这种格式)可以是其他任何东西,那就只是我感兴趣的领域。 66-121-89-14.domain.com – – [14/Apr/2011:14:47:05 +0100] "GET /city/index.html HTTP/1.1" 200 2577 "http://www.domain.com/referrer/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16" 我想我需要这样的东西。 failregex = ^(?P<host>\S*).*("-" "-"| 502 | 500 | 417 | 416 | 415 | 414 | 413 | 412 | 405 | 403 | 一个正则expression式爱好者可以帮忙吗?
我按照这个分步说明安装Redmine: http : //justnotes.co.cc/2010/02/11/how-to-install-redmine-on-ubuntu/ 我使用Ubuntu 10.04.1,Apache 2.2.14,Mongrel 1.1.5。 在VirtualHostconfiguration阶段,我使用这个: <VirtualHost *:80> ServerName myserver.lv ProxyPass /redmine/ http://localhost:8000/ ProxyPassReverse /redmine/ http://localhost:8000 ProxyPreserveHost on <Proxy *> Order allow,deny Allow from all </Proxy> </VirtualHost> 但是,当我将浏览器指向http://<my-server's-ip>/redmine/我看到的不是redmine web应用程序,而是“/ redmine的索引”,以及根目录中文件的索引Redmine的。 任何想法如何解决? PS试图删除VirtualHost的东西一起,而不是将以下简单的子句添加到apache2.conf: <Proxy *> Order allow,deny Allow from all </Proxy> ProxyPass /redmine/ http://localhost:8000/ ProxyPassReverse /redmine/ http://localhost:8000/ ProxyPreserveHost on 结果,行为改变了! 现在http://<my-server's-ip>/redmine/产生Redmine的起始页的源代码,所以它被提供服务,但显然没有渲染。 同时, http://<my-server's-ip>:8000/完全正常,所以Mongrel正在为Redmine应用程序提供服务,这只是在我的VirtualHost […]
我重新启动了我的服务器,但之后我的Apache服务将无法启动。 我可以通过SSH连接,并input/etc/init.d/apache2 start 它说,启动web服务器apache2 …完成 即使如此,该服务无法启动! 有谁知道可能会导致这种情况?
我将Apache作为HTTPS反向代理运行,其中许多实际主机通过单个VirtualHost(单个公共IP,通配符证书)使用mod_rewrite和mod_proxy进行代理。 基本上是这样的: <VirtualHost *:443> SSLEngine On … RewriteEngine On RewriteCond %{SERVER_NAME} ^(server1|server2|server3)\.domain\.net$ RewriteRule ^/(.*)$ https://%{SERVER_NAME}/$1 [P] # Forward requests for listed servers RewriteRule ^.*$ – [F] # Block anything else </VirtualHost>` 现在,我需要将Timeout设置为比默认值更大的值,但仅限于发送到其中一个服务器(用于移动设备的同步服务器)的请求。 这可以做到不需要一个单独的VirtualHost(从而另一个公共IP)?
在我创build一个虚拟主机之前,我可以看到“ http:// localhost ”,但是当我创build一个虚拟主机时,我看不到“ http:// localhost ”和虚拟主机“ http:// test ” 这是我的虚拟主机configuration文件: <VirtualHost test:80> ServerAdmin [email protected] ServerName test ServerAlias test DocumentRoot "/home/javad/Public/test/public" <Directory "/home/javad/Public/test/public/" > Options Indexes FollowSymLinks MultiViews ExecCGI DirectoryIndex index.php AllowOverride all Order allow,deny allow from all </Directory> </VirtualHost> 所以我跑了2场testing 并补充说 127.0.0.1testing到/ etc / hosts文件并重新启动apapche2 但之后,我无法访问http://testing甚至http:// localhost我得到 Forbidden You don't have permission to access […]
我需要安装包含IIS + PHP等的“Microsoft Web Platform Installer 3.0”,并且已经安装了我的std WAMP(AppServ)。 我知道我需要将其中一个端口更改为88或8080等(prob MS产品),但我不确定PHP文件关联如何更改和影响它。
我使用mod_wsgi运行django应用程序,并使用nginx进行代理。 我的一个观点需要2分钟才能完成。 当我访问它,我得到一个504网关超时。 有没有我可以改变的设置来增加超时所需的时间? 我已经尝试了nginx中的proxy_connect_timeout,proxy_read_timeout和proxy_send_timeout,没有任何运气。 谢谢。
我想通过浏览器使我的UnitTests可用。 我的目录结构如下所示: application docs public – index.php tests 我的DocumentRoot在公用文件夹中。 但是,当我尝试向我的Apacheconfiguration添加一个别名/源,并设置添加types的php-source到.php文件(而不是仅仅.phps),Apache仍然尝试执行这些文件。 有没有一个聪明的方法来做到这一点?
我试图设置Zenoss与https:// server / zenoss而不是https://服务器一起使用 。 这是我的重写规则: RewriteEngine On RewriteRule ^/zenoss($|/.*) http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot/zenoss$1 [L,P] 这种方式不起作用。 我得到: 网站错误 发布此资源时遇到错误。 所请求的资源不存在。 请点击这里返回到Zenoss仪表板 “请点击这里返回到Zenoss仪表板”的URL指向https:// server / zport / dmd 但是,如果我使用标准的Zenoss / Plone / Zope方式, RewriteEngine On RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/https/server:443/VirtualHostRoot/$1 [L,P] …效果很好。 根据这篇文章 ,这似乎是第一种方式应该工作。 我不确定我错过了什么。
我无法编译在PHP中的freetype支持… 我的configuration命令是: ./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql –enable-bcmath –enable-zip –with-zlib –with-gd –with-jpeg-dir=/usr/lib –with-mysqli –enable-mbstring –with-pdo-mysql –with-pgsql=/usr/lib/pgsql –with-freetype-dir=/usr/lib –enable-gd-native-ttf 它运行良好(不抱怨什么),编译也成功,但最终freetype支持未启用: ["GD Version"]=> string(27) "bundled (2.0.34 compatible)" ["FreeType Support"]=> bool(false) ["T1Lib Support"]=> bool(false) / usr / lib看起来是正确的地方寻找freetype: # pwd /usr/lib # ll|grep -i freetype lrwxrwxrwx 1 root root 21 Dec 10 13:35 libfreetype.so -> libfreetype.so.6.3.10 lrwxrwxrwx 1 root root […]