Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 65864 invoked from network); 24 Aug 2004 12:40:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 24 Aug 2004 12:40:44 -0000 Received: (qmail 32356 invoked by uid 500); 24 Aug 2004 12:40:08 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 32201 invoked by uid 500); 24 Aug 2004 12:40:07 -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: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 32121 invoked by uid 99); 24 Aug 2004 12:40:06 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [131.211.232.45] (HELO finkel.lan) (131.211.232.45) by apache.org (qpsmtpd/0.27.1) with ESMTP; Tue, 24 Aug 2004 05:40:03 -0700 Received: from clyde (203pc232.sshunet.nl [131.211.232.203]) (authenticated bits=0) by finkel.lan (8.12.8/8.12.8) with ESMTP id i7OCdJKC021900; Tue, 24 Aug 2004 14:39:21 +0200 Message-Id: <200408241239.i7OCdJKC021900@finkel.lan> From: "Jeroen van Meeuwen" To: , "'Robert Andersson'" Date: Tue, 24 Aug 2004 14:39:42 +0200 Organization: PC Zone Benelux Clan MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: <055001c489d5$1fdb6d90$652e50d5@profundis.se> Thread-Index: AcSJ1RSbBKbf+xkSTQO2bDECM9GnpwAAdo2A X-Virus-Checked: Checked Subject: RE: [users@httpd] Custom authorization of static content X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Here's an example: My httpd.conf sais: ServerAdmin webmaster@pczone-clan.nl DocumentRoot /home/kanarip/public_html/ Alias /data /data/ ServerName www.apache.lan Order Allow,Deny Allow from All php_value auto_prepend_file "/home/kanarip/public_html/auth.php" The contents of auth.php: This works excellent on httpd-2.0.50 with PHP 5.0.0 Let me know if it works for you :) Kind regards, kanarip > -----Original Message----- > From: Robert Andersson [mailto:robert@profundis.nu] > Sent: dinsdag 24 augustus 2004 14:23 > To: users@httpd.apache.org > Subject: Re: [users@httpd] Custom authorization of static content > > Jeroen van Meeuwen wrote: > > Anyway, I think I have a solution: > > > > From within you VirtualHost or Directory directive, you might > > specify: > > > > > > php_value auto_prepend_file > > "/some/directory/to/your/I-really-need-this-authentication.php" > > > > > > This file is parsed and executed, and so might check > weither a user is > > authenticated. > > Hmm... from what I gather from the docs, it is only parsed > and executed when a document affected by the directive is > parsed by PHP. I could be wrong, though. > > As stated, the problem is mainly static contents (images, > PDF-files etc) that I wish to keep static, yet have custom > code executed in the authorization stage of the request. In > such way, that if the custom code "returned" 403, my standard > 403 error document would be served. > > Regards, > Robert Andersson > > > --------------------------------------------------------------------- > The official User-To-User support forum of the Apache HTTP > Server Project. > See for more info. > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org > " from the digest: users-digest-unsubscribe@httpd.apache.org > For additional commands, e-mail: users-help@httpd.apache.org > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See for more info. To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org " from the digest: users-digest-unsubscribe@httpd.apache.org For additional commands, e-mail: users-help@httpd.apache.org