
alvaro at gnu
Jun 12, 2008, 3:45 AM
Post #2 of 2
(185 views)
Permalink
|
|
Re: Problem with php when using Directory rules
[In reply to]
|
|
Hi Jorge, I guess I know what the problem is. You have a directory containing PHP files, and you want to require authentication to access it; Is that it? In a case like this is when you need to have a well understanding of how the Cherokee rule mechanism works. Let me briefly summarize it: - Rules are evaluated from TOP to BOTTOM. The order DOES matter. You can drag and drop rules from the configuration interface in order to reprioritize them. - There are final and not-final rules. If a rule is a final rule, the server will stop trying to match the rest once it has matched it. - Final rules allow to "inherit" from another rules. How would all this apply to your case? Your "Behavior rules" ought to be similar to this: Type Name Handler Validation Final ======================================================= Direcotory /example None MySQL [ ] . [more rules] . Extension PHP FastCGI None [x] So, if you request /example/thing.php, it would first match with the Directory entry, but as long as it is not a final rules, it would continue trying the match the rest. When it were about to finish, it would find the Extension PHP rule so it would mix it with the previous match. The final result would be exactly what you are looking for. The most important thing here is to remember that the order matters, and to know how to mix rule contents by using non-final rules. On 12 Jun 2008, at 11:01, Jorge Sarmiento wrote: > I am trying to set up a directory authentication rule against MySQL. > > I created the rule, selected [none|List & Send] as handlers (I tried > with both), and configured the mysql authentication. > > Mysql authentication worked fine, but my php extension rule (that > was working fine before and that works fine for the rest of the > pages in the vhost) stopped working, and php files from that > directory where not passed to the fcgi interface. I tried moving my > directory rule to different positions in the Behavior rule list with > no luck. > > do I need to create a php extension rule separetely for the > directories I apply authentication? > > thanks in advance, -- Greetings, alo. http://www.alobbs.com/ _______________________________________________ Cherokee mailing list Cherokee[at]cherokee-project.com http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee
|