[Cherokee] Redirection Handler with Concrete5 CMS

8 views
Skip to first unread message

Ossama Khayat

unread,
Oct 7, 2009, 2:15:22 AM10/7/09
to cher...@lists.octality.com
Hi,

I've been trying to use Redirection Handler with a local install of Concrete5 CMS (concrete5.org), which is a great CMS btw ;-)

The rule is a very simple one, main to remove the index.php from the URL.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /awqaf/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

I used cherokee-admin and did the following steps:
1. Edit the default virtual host
2. Add a new 'directory' rule with the value /awqaf
3. Used the Redirection Handler
4. In the Rule List I have:
+ Type: Internal
+ Regular Expression: (\.+)$
+ Substitution: index.php/$1/

Saved and restarted, and now I get a 500 Internal Server Error. Here is the config file lines:

vserver!10!nick = default
vserver!10!rule!700!encoder!deflate = 0
vserver!10!rule!700!encoder!gzip = 0
vserver!10!rule!700!handler = redir
vserver!10!rule!700!handler!rewrite!1!regex = (\.+)$
vserver!10!rule!700!handler!rewrite!1!show = 0
vserver!10!rule!700!handler!rewrite!1!substring = index.php/$1/
vserver!10!rule!700!match = directory
vserver!10!rule!700!match!directory = /awqaf
vserver!10!rule!700!no_log = 0
vserver!10!rule!700!only_secure = 0

Using Cherokee 0.99.22 on Debian Squeeze (testing). I tested this with 0.99.24 without success.

The documentation example really isn't clear at all.



_______________________________________________
Cherokee mailing list
Cher...@lists.octality.com
http://lists.octality.com/listinfo/cherokee

Walter Ebert

unread,
Oct 7, 2009, 2:38:07 AM10/7/09
to Ossama Khayat, cher...@lists.octality.com

Ossama Khayat

unread,
Oct 7, 2009, 3:39:27 AM10/7/09
to cher...@lists.octality.com
--- On Wed, 10/7/09, Walter Ebert <li...@walterebert.com> wrote:
> From: Walter Ebert <li...@walterebert.com>
> Subject: Re: [Cherokee] Redirection Handler with Concrete5 CMS

Wonderful article. It worked for me. What I'm trying to do though is to apply the rule to a subdirectory using the default virtual host. Just like you place an .htaccess file within a directory and it is inherited by the subdirectory.
Also, it would be great if a Wizard is created for this. I had a look at the wizard files, and I'm trying to do one for Concrete5.

Thanks,
Ossama

Antonio Pérez

unread,
Oct 7, 2009, 3:43:08 AM10/7/09
to Ossama Khayat, cher...@lists.octality.com
Hello,

On Wed, Oct 7, 2009 at 9:39 AM, Ossama Khayat <okh...@yahoo.com> wrote:

>> Take a look here:
>> http://blog.walterebert.com/using-pretty-urls-in-concrete5-with-cherokee
>
> Wonderful article. It worked for me. What I'm trying to do though is to apply the rule to a subdirectory using the default virtual host. Just like you place an .htaccess file within a directory and it is inherited by the subdirectory.
> Also, it would be great if a Wizard is created for this. I had a look at the wizard files, and I'm trying to do one for Concrete5.

Yeah!, a Wizard would be great... go for it! ;-)

--
Saludos:
Antonio Pérez

Walter Ebert

unread,
Oct 7, 2009, 5:25:44 AM10/7/09
to Ossama Khayat, cher...@lists.octality.com
On Wed, 2009-10-07 at 00:39 -0700, Ossama Khayat wrote:
> --- On Wed, 10/7/09, Walter Ebert <li...@walterebert.com> wrote:
> > From: Walter Ebert <li...@walterebert.com>
> > Subject: Re: [Cherokee] Redirection Handler with Concrete5 CMS
> > Hi Ossama,
> >
> > Take a look here:
> > http://blog.walterebert.com/using-pretty-urls-in-concrete5-with-cherokee
>
> Wonderful article. It worked for me. What I'm trying to do though is to apply the rule to a subdirectory using the default virtual host. Just like you place an .htaccess file within a directory and it is inherited by the subdirectory.
> Also, it would be great if a Wizard is created for this. I had a look at the wizard files, and I'm trying to do one for Concrete5.
>
For a subdirectory you can add a "Regular Expression" rule and set a
redirection handler. Something like:
Regular Expression: ^/concrete5/
Handler: Redirection: ^/concrete5/(.*)$ /concrete5/index.php/$1

And, of course, add the subdirectory to the other concrete5 rules.
Leaving the default at List & Send.

I haven't tried creating a wizard yet.

Cheers,
Walter

Taher Shihadeh

unread,
Oct 9, 2009, 1:41:12 PM10/9/09
to Ossama Khayat, cher...@lists.octality.com
Te hard part is getting the configuration right. Believe me, I know.
I've just uploaded a dozen or so that should be shipped with 0.99.25.
If people posted their working cherokee.conf samples, most Wizards could
be coded in a breeze.

Ossama Khayat wrote:
> --- On Wed, 10/7/09, Walter Ebert <li...@walterebert.com> wrote:
>
>> From: Walter Ebert <li...@walterebert.com>
>> Subject: Re: [Cherokee] Redirection Handler with Concrete5 CMS
>> Hi Ossama,
>>
>> Take a look here:
>> http://blog.walterebert.com/using-pretty-urls-in-concrete5-with-cherokee
>>
>
> Wonderful article. It worked for me. What I'm trying to do though is to apply the rule to a subdirectory using the default virtual host. Just like you place an .htaccess file within a directory and it is inherited by the subdirectory.
> Also, it would be great if a Wizard is created for this. I had a look at the wizard files, and I'm trying to do one for Concrete5.
>
> Thanks,
> Ossama
>

--
ta...@unixwars.com
http://unixwars.com/

Gunnar Wolf

unread,
Oct 13, 2009, 2:33:23 PM10/13/09
to Taher Shihadeh, cher...@lists.octality.com
Taher Shihadeh dijo [Fri, Oct 09, 2009 at 07:41:12PM +0200]:

> Te hard part is getting the configuration right. Believe me, I know.
> I've just uploaded a dozen or so that should be shipped with 0.99.25.
> If people posted their working cherokee.conf samples, most Wizards could
> be coded in a breeze.

Umh... Just thinking out loud: I think many similar issues could be
solved (or helped) by showing clueless users exactly what portions of
the configuration are generated by a particular screen/entry in
cherokee-admin.

Of course, there are _lots_ of possible ways to implement this, but
I'm sure it would:

• Increase the contributions you mention
• Increase the amount of "well, duh!" moments, where users find out
obvious things they would have not find otherwise
• Make it easier to give support to users not understanding the whole
working of the server

Before logging this as a bug^Wrequest for enhancement, what would you
think?

--
Gunnar Wolf • gw...@gwolf.org(+52-55)5623-0154 / 1451-2244

Taher Shihadeh

unread,
Oct 13, 2009, 3:37:12 PM10/13/09
to Gunnar Wolf, cher...@lists.octality.com
Hi Gunnar :)

What would you suggest, popping-up the info with something like Growl?
(although it isn't really useful until it is saved on disk, since rule
priorities change on the fly).
Actually I think this would be useful for the expert users, not for the
clueless ones. Could you elaborate, please? :)

Regarding my previous message, I insist: any one wanting a wizard for a
favorite app is encouraged to send a working cherokee.conf ready for the
application. It *will* certainly boost that wizard up in the creation
queue ;-)

[1] http://growl.info/screenshots.php

Gunnar Wolf wrote:
> Taher Shihadeh dijo [Fri, Oct 09, 2009 at 07:41:12PM +0200]:
>
>> Te hard part is getting the configuration right. Believe me, I know.
>> I've just uploaded a dozen or so that should be shipped with 0.99.25.
>> If people posted their working cherokee.conf samples, most Wizards could
>> be coded in a breeze.
>>
>
> Umh... Just thinking out loud: I think many similar issues could be
> solved (or helped) by showing clueless users exactly what portions of
> the configuration are generated by a particular screen/entry in
> cherokee-admin.
>
> Of course, there are _lots_ of possible ways to implement this, but
> I'm sure it would:
>
> • Increase the contributions you mention
> • Increase the amount of "well, duh!" moments, where users find out
> obvious things they would have not find otherwise
> • Make it easier to give support to users not understanding the whole
> working of the server
>
> Before logging this as a bug^Wrequest for enhancement, what would you
> think?
>
>


--
ta...@unixwars.com
http://unixwars.com/

Taher Shihadeh

unread,
Oct 26, 2009, 3:00:29 PM10/26/09
to Ossama Khayat, cherokee
Marhaba Ossama!

Antonio Pérez wrote:
> Hello,
>
> On Wed, Oct 7, 2009 at 9:39 AM, Ossama Khayat <okh...@yahoo.com> wrote:
>
>
>>> Take a look here:
>>> http://blog.walterebert.com/using-pretty-urls-in-concrete5-with-cherokee
>>>
>> Wonderful article. It worked for me. What I'm trying to do though is to apply the rule to a subdirectory using the default virtual host. Just like you place an .htaccess file within a directory and it is inherited by the subdirectory.
>> Also, it would be great if a Wizard is created for this. I had a look at the wizard files, and I'm trying to do one for Concrete5.
>>
>
> Yeah!, a Wizard would be great... go for it! ;-)
>

I was wondering if you had any luck, were still interested and/or needed
help with this.
In any case, I would really appreciate it if you could log a request for
enhancement in our bug track (http://bugs.cherokee-project.com), and
attach your working cherokee.conf to it. That way we won't loose track
of the issue, and someone could pick up the task of doing the wizard in
case you wouldn't finish it for whatever reason.

Regards,
Taher

--
ta...@unixwars.com
http://unixwars.com/

Ossama Khayat

unread,
Oct 26, 2009, 6:28:12 PM10/26/09
to Cherokee Mailing List
--- On Mon, 10/26/09, Taher Shihadeh <ta...@unixwars.com> wrote:
> From: Taher Shihadeh <ta...@unixwars.com>
[...]
> Marhaba Ossama!

Ya hala beek!

[...]


> I was wondering if you had any luck, were still interested
> and/or needed help with this.
> In any case, I would really appreciate it if you could log
> a request for enhancement in our bug track (http://bugs.cherokee-project.com), and attach your
> working cherokee.conf to it. That way we won't loose track
> of the issue, and someone could pick up the task of doing
> the wizard in case you wouldn't finish it for whatever
> reason.

I was trying to compile 0.99.25 on Debian Testing today, but after finishing successfully it didn't start. Is there an easy way to build a .deb package for Debian, or if you can tell me what are the most suitable parameters to use with 'configure' to install and run it smoothly on Debian Testing.

Anyway, I'll give it another shot tomorrow and get back to you.

Thanks for the follow up.

regards,
Ossama

Taher Shihadeh

unread,
Oct 27, 2009, 8:36:11 AM10/27/09
to Ossama Khayat, Cherokee Mailing List
Ossama Khayat wrote:
> I was trying to compile 0.99.25 on Debian Testing today, but after finishing successfully it didn't start. Is there an easy way to build a .deb package for Debian, or if you can tell me what are the most suitable parameters to use with 'configure' to install and run it smoothly on Debian Testing.
>
I guess Gunnar and Leonel are the guys to go for this one ;-) Me, I just
use checkinstall from time to time (or not even that, which I'm sure
will be frowned upon by our local experts). Anyway, it is strange that
Cherokee is built but wouldn't run. Did you try to launch a
cherokee-worker by hand to see what's wrong (maybe even with
CHEROKEE_TRACE or using an alternative config file)?

> Anyway, I'll give it another shot tomorrow and get back to you.
>

Great :)


> Thanks for the follow up.
>

^afwan.

Regards,
Taher

--
ta...@unixwars.com
http://unixwars.com/

_______________________________________________

Ossama Khayat

unread,
Oct 27, 2009, 5:50:51 PM10/27/09
to Cherokee Mailing List
----- Original Message ----
> From: Taher Shihadeh <ta...@unixwars.com>
[...]
> I guess Gunnar and Leonel are the guys to go for this one ;-) Me, I just use
> checkinstall from time to time (or not even that, which I'm sure will be frowned
> upon by our local experts). Anyway, it is strange that Cherokee is built but
> wouldn't run. Did you try to launch a cherokee-worker by hand to see what's
> wrong (maybe even with CHEROKEE_TRACE or using an alternative config file)?

No worries. The first time I did ./configure I didn't specify any directory info (as in http://www.cherokee-project.com/doc/basics_installation_unix.html). Once done, it worked perfectly.

Regarding Concrete5, It's working very fast and using clean URLs. I create a virtual host 'concrete', added a 127.0.0.1 concrete to my /etc/hosts and it's working perfect. Attached is my config.

One thing though, I didn't know how to run it as a subdirectory in my 'Default' virtual server.

regards,
Ossama

cherokee.conf.zip

Gunnar Wolf

unread,
Oct 28, 2009, 3:06:50 PM10/28/09
to Ossama Khayat, Cherokee Mailing List
Ossama Khayat dijo [Mon, Oct 26, 2009 at 03:28:12PM -0700]:

>
> I was trying to compile 0.99.25 on Debian Testing today, but after
> finishing successfully it didn't start. Is there an easy way to
> build a .deb package for Debian, or if you can tell me what are the
> most suitable parameters to use with 'configure' to install and run
> it smoothly on Debian Testing.
>
> Anyway, I'll give it another shot tomorrow and get back to you.

Good news:

http://packages.debian.org/sid/cherokee

I uploaded it to Sid, still using the old-but-tried build method :-)
You can download the source package (the orig.tar.gz / .dsc / .diff.gz
linked from that page), and that should build cleanly on your Testing
system.

--
Gunnar Wolf • gw...@gwolf.org(+52-55)5623-0154 / 1451-2244

Reply all
Reply to author
Forward
0 new messages