Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CD9A318372 for ; Tue, 22 Dec 2015 14:59:46 +0000 (UTC) Received: (qmail 89657 invoked by uid 500); 22 Dec 2015 14:59:41 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 89587 invoked by uid 500); 22 Dec 2015 14:59:41 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 89577 invoked by uid 99); 22 Dec 2015 14:59:41 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Dec 2015 14:59:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 9DABB180477 for ; Tue, 22 Dec 2015 14:59:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.898 X-Spam-Level: **** X-Spam-Status: No, score=4.898 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, KAM_GENERICHEALTH=5, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id f0dqB9ITfJ2y for ; Tue, 22 Dec 2015 14:59:39 +0000 (UTC) Received: from mail-qg0-f52.google.com (mail-qg0-f52.google.com [209.85.192.52]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id A2B95203B9 for ; Tue, 22 Dec 2015 14:59:38 +0000 (UTC) Received: by mail-qg0-f52.google.com with SMTP id k90so132944221qge.0 for ; Tue, 22 Dec 2015 06:59:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=zuJKiU5sBU6hcc7vBcpMAn5v0wHpjl6GvBLMGH/gtEs=; b=gcOAWKLcmi/PoRx+tjq/FXBBqjNlgHUYqJBtOEsV/Di0b/3/RQQK4FxWXbqNmlDS2p d/o8pwMZ+0Apw5eF1pyWKCw4OITKh1Ox2Jo1Uqh0Epj3PbOLxAa2GtlDrfZ/cEa5KYvw IGYZyjwguKkI5E2KhBdR+ioZb+XE8x1YqLqEF3eiyuH8cqrIt1lC37nHbrBmHZYpXmmU tYzxdlc49sM42olYnvaA2FESUjuTUMUd6zPqeQ3AgvFF2FC5Exrkp6mWk/T/3c3mvCWs 7cZ9MCfyvA09VKk1krtuMUxSTVMgCaQUzorbst/RgN0RL/gvU0j+N1eYYNyVagb6n3qm Av8Q== X-Received: by 10.140.92.194 with SMTP id b60mr33121063qge.85.1450796371707; Tue, 22 Dec 2015 06:59:31 -0800 (PST) Received: from localhost ([181.22.145.31]) by smtp.gmail.com with ESMTPSA id q133sm16101897qhq.20.2015.12.22.06.59.30 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Dec 2015 06:59:31 -0800 (PST) Date: Tue, 22 Dec 2015 11:59:23 -0300 From: =?iso-8859-1?Q?Rapha=EBl?= To: users@httpd.apache.org Message-ID: <20151222145923.GA17004@debovo.drzraf.me> References: <20151110135828.GB7909@debovo.drzraf.me> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20151110135828.GB7909@debovo.drzraf.me> X-PGP-Key: http://pool.sks-keyservers.net/pks/lookup?op=vindex&search=0xd7f62b21 User-Agent: Mutt/1.5.23 (2014-03-12) Subject: [users@httpd] Re: mod_cache for FallbackResource? Any takers? >From another discussion level I wanted to see if cache disk could compete with Varnish, eg: - Apache + mod_cache_disk + mod_ssl could be a better stack than - Apache + Varnish + Pound. So far, I'm under the impression that managing a reverse-caching proxy with mod_cache is, if even realistically possible, by far more complex and less powerful than Varnish. That's pretty hard to believe since being an Apache module, mod_cache theorically benefits from a better integration and higher "knowledge" from the backend HTTPd. As an example, caching dynamic resources having different query strings is a non-issue using Varnish (or most other reverse-proxy caches). What makes mod_cache so specific in this regard? On Tue, Nov 10, 2015 at 10:58:28AM -0300, Rapha�l wrote: > Hi, > > using php/fcgi, I've a Content Management System whose entry-point is /index.php > On the Apache-side it makes use of FallbackResource > > According to the documentation: > > As a filter, mod_cache can be placed in front of content originating > > from any handler, including flat files (served from a slow disk cached > > on a fast disk), the output of a CGI script or dynamic content > > generator, or content proxied from another server. > > > I want to benefit from this fine grained control and configure it as: > > > > > ServerName website > > DocumentRoot "/var/www/website" > > > > Require all granted > > AllowOverride None > > > > SetHandler "proxy:unix:/var/run/php5-fpm-website.sock|fcgi://blah" > > > > FallbackResource /index.php > > > > > > > > > > > > CacheHeader On > > CacheDetailHeader On > > CacheQuickHandler Off > > > > > > CacheEnable disk > > > > > > > > CacheDisable on > > > > > > > A sample, not significant, index.php file inside /var/www/website: > > > $uri = trim($_SERVER['REQUEST_URI'], '/'); > > if ($uri == 'cacheit') header('Cache-Control: max-age=30'); > > elseif ($uri == 'dontcache') header('Cache-Control: no-cache'); > > > There are multiple issues, whatever syntax/order variations is used, like > > `CacheEnable disk /` > at the VirtualHost level. > > > But the first one being that the directive are *not* taken into > account. > A sample of mod_cache debug output, when a `GET /dontcache` is issued soon > after `GET /cacheit` (and results in a cached output): > > cache_storage.c(664): AH00698: cache: Key for entity /index.php?(null) is http://website:80/index.php? > > mod_cache_disk.c(572): AH00709: Recalled cached URL info header http://website:80/index.php? > > mod_cache_disk.c(885): AH00720: Recalled headers for URL http://website:80/index.php? > > mod_cache.c(601): AH00761: Replacing CACHE with CACHE_OUT filter for /index.php > > mod_cache.c(652): AH00763: cache: running CACHE_OUT filter > > mod_cache.c(681): AH00764: cache: serving /index.php > > Indeed htcacheclean -A only shows one unique version of stored, keyed "index.php" > > > I did some attempts using `CacheQuickHandler On` and was able to get > distinct cache entries for /cacheit and /dontcache. > That was good but it does not solve the issue of not being > taken into account (and the CacheEnable flag not being respected): > > Eg: > > > > CacheDisable on > > > is not respected (wild guess: because /private is not a "real" resource) > > > Moreover I'd rather stick with a normal cache handler since I hope it'd would > make possible to insert Header/RequestHeader and I also expect to > use things like: > > SetEnvIfNoCase Cookie admin_cookie no-cache > that the CacheQuickHandler would not treat. > > > Question: > Is there any way to make CacheEnable work on a granular basis > when a FallbackResource is used and that the parameter is the > original un-rewritten URL? > > > Thank you! -- GPG id: 0xF41572CEBD4218F4 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org