[prev in list] [next in list] [prev in thread] [next in thread]
List: cherokee
Subject: Re: [Cherokee] Zend Framework in Cherokee
From: "pacopepe22 pacopepe22" <pacopepe222 () gmail ! com>
Date: 2008-08-25 23:35:42
Message-ID: a4ea567c0808251635r1b7be2bbh58aa900eca9227d8 () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
2008/8/25 Alvaro Lopez Ortega <alvaro@gnu.org>
> pacopepe22 pacopepe22 wrote:
>
>> 2008/8/24 Miguel Angel Ajo Pelayo <miguelangel@ajo.es <mailto:
>> miguelangel@ajo.es>>
>>
>> Cherokee supports php5, I can warantee that (It's in production on my
>> servers). You have to use it in the php5-cgi form (FastCGI) much
>> faster than the php5 plugin for apache :-)
>>
>> About the rewrites, I suppose that your rewrite means:
>>
>> "Everything that doesn't end with .jpg, .gif, .css, etc.." rewrite
>> it to index.php ?
>>
>> Yes! The Zend Framework need it.
>>
>
> Of course these set ups are possible with Cherokee. In fact, they are even
> easier to write than with the ancient pseudo-XML and mod_* :-)
>
> Let's see. A virtual server behavior is defined by a set of ordered rules.
> Every time the server accepts a requests, it evaluates the request against
> the table in order to figure how it should be handled. If you prefer to
> think in lower level terms, it is quite similar to a routing table (the IP
> would be the request, and the routing table would be the behavior list).
>
> So, which behavior rules would you have to set in order to force it to
> handle everything but a few file extensions with a fixed php file? It'd be
> something like this:
>
> ========
> Extensions=js,ico,gif,jpg,png,css Handler=File Final=Yes
> Default Handler=FastCGI Final=Yes (php)
> ========
>
> Remember that rules are ordered and are evaluated from top to bottom. In
> this case, setting these two rules would do the trick.
>
> The last tweak would be to edit the details for the "Default" rule (the
> last one). Here you will have to set the "Script Alias" to the full path of
> your index.php file (that's important, it must be the full path). And
> finally, ensure that the "Check File" property is unselected.
>
> The rationale is:
> - If the request targets a static file, it will match the first rule; thus,
> it will use the Static Content handler as configured.
> - If not so, the request will match with the final rule (Default), so it
> will be handled by the index.php file.
>
> I hope this helps. If you have any doubt, do not hesitate to ask.
Simply perfect!
Thank you very much :)
>
>
> --
> Greetings, alo
> http://www.alobbs.com/
>
[Attachment #5 (text/html)]
<div dir="ltr"><br><br><div class="gmail_quote">2008/8/25 Alvaro Lopez Ortega <span \
dir="ltr"><<a href="mailto:alvaro@gnu.org">alvaro@gnu.org</a>></span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;"> pacopepe22 pacopepe22 wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> 2008/8/24 Miguel Angel Ajo Pelayo <<a \
href="mailto:miguelangel@ajo.es" target="_blank">miguelangel@ajo.es</a> <mailto:<a \
href="mailto:miguelangel@ajo.es" target="_blank">miguelangel@ajo.es</a>>><div \
class="Ih2E3d"> <br>
<br>
Cherokee supports php5, I can warantee that (It's in production on \
my<br> servers). You have to use it in the php5-cgi form (FastCGI) \
much<br> faster than the php5 plugin for apache :-)<br>
<br>
About the rewrites, I suppose that your rewrite means:<br>
<br>
"Everything that doesn't end with .jpg, .gif, .css, \
etc.." rewrite<br> it to index.php ?<br>
<br>
Yes! The Zend Framework need it.<br>
</div></blockquote>
<br>
Of course these set ups are possible with Cherokee. In fact, they are even easier to \
write than with the ancient pseudo-XML and mod_* :-)<br> <br>
Let's see. A virtual server behavior is defined by a set of ordered rules. Every \
time the server accepts a requests, it evaluates the request against the table in \
order to figure how it should be handled. If you prefer to think in lower level \
terms, it is quite similar to a routing table (the IP would be the request, and the \
routing table would be the behavior list).<br>
<br>
So, which behavior rules would you have to set in order to force it to handle \
everything but a few file extensions with a fixed php file? It'd be something \
like this:<br> <br>
========<br>
Extensions=js,ico,gif,jpg,png,css Handler=File \
Final=Yes<br> Default \
Handler=FastCGI Final=Yes \
(php)<br> ========<br>
<br>
Remember that rules are ordered and are evaluated from top to bottom. In this case, \
setting these two rules would do the trick.<br> <br>
The last tweak would be to edit the details for the "Default" rule (the \
last one). Here you will have to set the "Script Alias" to the full path of \
your index.php file (that's important, it must be the full path). And finally, \
ensure that the "Check File" property is unselected.<br>
<br>
The rationale is:<br>
- If the request targets a static file, it will match the first rule; thus, it will \
use the Static Content handler as configured.<br>
- If not so, the request will match with the final rule (Default), so it will be \
handled by the index.php file.<br> <br>
I hope this helps. If you have any doubt, do not hesitate to \
ask.</blockquote><div></div><div>Simply perfect!</div><div></div><div>Thank you very \
much :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex;"> <br><font color="#888888">
<br>
--<br>
Greetings, alo<br>
<a href="http://www.alobbs.com/" target="_blank">http://www.alobbs.com/</a><br>
</font></blockquote></div><br></div>
_______________________________________________
Cherokee mailing list
Cherokee@lists.octality.com
http://lists.octality.com/listinfo/cherokee
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic