On 01/05/2011 04:09 AM, Alvaro Lopez Ortega wrote:
But as I said, from what I can tell, all rules seem to be falling through and 
hitting default. I would expect (again, I'm likely missing some fundamental 
understanding of cherokee rules) that if I'm trying to access main/, it hits 
the doku.php in the root (which I configured as an index) and should be happy 
with that rule...

- The first thing it does is to find the virtual server in charge of processing 
the request. The request is evaluated against the virtual server list from top 
to bottom (mind the order). As soon as a virtual server matches, the evaluation 
stops.
So am I correct in perceiving Cherokee's "virtual servers" as administrative/functional domains for web processing (and not necessarily separate web domains-- but could be)? That's the impression I got from the docs.

And that's how I've been endeavoring to approach things- arranging as if they are one big if/else-if/else-if/else block... it checks each one, starting at the first, falling through to the second, the third, etc. and if none match, the final "else" (default) grabs it.
- Once the virtual server has been chosen, the request is evaluated against the 
virtual server's behavior list. Again, the evaluation is perform in order - 
from the top of the list to the bottom.  Whenever a rule matches, it's 
definitions are applied (authentication, handler, caching properties, custom 
document root, etc). The evaluation stops when a 'Final' rule is matched, or 
the 'default' rule (the last) is hit.

Okay... I'm trying to digest this... the behavioral rules are applied only AFTER a virtual server is identified... which means the identification criteria for virtual servers are based on:

- Virtual Server nickname (is this just a label, or does it expect something real like a domain name?) - Document Root (if so, and I have both my dokuwiki site and default pointing to /var/www, wouldn't that match the dokuwiki site, as it is "above" default?) - Directory Indexes (I currently have default blank, and put in "index.php,doku.php" which are both present in the document root) - Can I assume "Host Match" will also aid in virtual server identification? So if I have "Match Nickname" set for the Host Match method, and I have Nickname set to "dokuwiki", which is currently just a label and bears no semblance of actual file structure on the disk... is that working against me?

Does the Host Match criteria play a (or the?) fundamental role in virtual server identification? I'm going to try this of course, but just want to make sure I have an understanding of the selection criteria.

And unlike the virtual servers, the behavioral rules can be cumulative... accruing attributes until an end-case (final or default) is reached... thanks for that clarification.

- Then, the request is processed according with the parameter collected during 
from the behavior rules.

To clarify, what precisely is this collected parameter? The URL requested, or the portion of the URL consisting of the path hanging off the document root? (based on my understanding, I'd assume at least the latter).

 I ask because you then go on to state:
Regarding the redirections/regular expression, it's important to notice that 
they are match against the request rather than against the full URL. Bare that 
in mind whenever you add regexs. Actually, since the virtual server matching is 
performed in an early processing stage, it would not make much sense to include 
in the request processing phase, would it?.

So I want to ascertain whether there is any operational difference between regex-specific rule processing and the information rules encounter in general...

 - Do rules receive JUST the "request" (path from docroot)?
 - Or do rules get more (the whole URL)?

I know it might be kind of uncomfortable to change the mindset to fit these 
little differences at first. It is a much logical (and thus, natural) way to 
define and maintain the behavior of a Web Server. It does only require a while 
to forget the old habits and get used to it.

Oh, I'm not complaining... I *want* to use Cherokee because I am drawn to its structure... in fact it reminds me a bit of the structure of OpenBSD's pf firewall ruleset. I just need to pick up the intrinsics of the language (order of operations, data types, etc.)

 Thanks for the information!

-Matthew
_______________________________________________
Cherokee mailing list
[email protected]
http://lists.octality.com/listinfo/cherokee

Reply via email to