Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Making mythweb work

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


email at davebv

Sep 15, 2009, 1:23 AM

Post #1 of 4 (413 views)
Permalink
Making mythweb work

Hi everybody.
I am trying to setup mythweb in cherokee, but i am unable to configure the
rewrite rules properly. I have a apache configuration and lighttpd and
trying to put those for cherokee.


The rules needed are the following:

"^/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" => "$0",
"^/(pl(/.*)?)$" => "/mythweb.pl/$1",
"^/(.+)$" => "/mythweb.php/$1",
"^/(.*)$" => "/mythweb.php"

I tried to insert them just as a regular expression and redirection as
a handler. But the css, data, images, js, themes, etc are not working
properly.

What are the rules should I use?


Thanks for your help.


alvaro at octality

Sep 15, 2009, 1:50 AM

Post #2 of 4 (380 views)
Permalink
Re: Making mythweb work [In reply to]

Hello there,

It looks like it'd be something like this:

- Extension .php, handler FastCGI. Non-Final.
- Extension .pl, (however you want to configure this). Non-Final.
- File Exists (any), handler File. Final.
- RegEx ^/(pl(/.*)?)$, handler Redirection, substitution: /mythweb.pl/
$1. Final.
- RegEx ^/(.+)$, handler Redirection, substitution: /mythweb.php/$1.
Final.
- Default: handler Redirection, substitution: /mythweb.php. Final.

Bare in mind that rules are evaluated from top to bottom, so the order
does matter.
Good luck!

On 15/09/2009, at 10:23, David Becerril wrote:

> Hi everybody.
>
> I am trying to setup mythweb in cherokee, but i am unable to
> configure the rewrite rules properly. I have a apache configuration
> and lighttpd and trying to put those for cherokee.
>
>
> The rules needed are the following:
>
> "^/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" =>
> "$0",
> "^/(pl(/.*)?)$" => "/mythweb.pl/$1",
> "^/(.+)$" => "/mythweb.php/$1",
> "^/(.*)$" => "/mythweb.php"
>
>
> I tried to insert them just as a regular expression and redirection
> as a handler. But the css, data, images, js, themes, etc are not
> working properly.
> What are the rules should I use?
>
> Thanks for your help.
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee

--
Octality
http://www.octality.com/

_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


aperez at skarcha

Sep 15, 2009, 5:28 AM

Post #3 of 4 (384 views)
Permalink
Re: Making mythweb work [In reply to]

Hello!,

I've just tested it and it works, but installing Mythweb under "/mythweb" ;)

Anyway, David, you must add these environment variables to your PHP
information source:

db_server
db_name
db_login
db_password

And now a question for the rest of the audience: could it be
interesting a handler to add environment variables per rule? In this
way, we could have environment variables per rule and not per
information source.

I think I'll code a Mythweb Wizard for cherokee-admin, BTW...

On Tue, Sep 15, 2009 at 10:50 AM, Alvaro Lopez Ortega
<alvaro [at] octality> wrote:
> Hello there,
>
> It looks like it'd be something like this:
>
> - Extension .php, handler FastCGI. Non-Final.
> - Extension .pl, (however you want to configure this). Non-Final.
> - File Exists (any), handler File. Final.
> - RegEx ^/(pl(/.*)?)$, handler Redirection, substitution: /mythweb.pl/
> $1. Final.
> - RegEx ^/(.+)$, handler Redirection, substitution: /mythweb.php/$1.
> Final.
> - Default: handler Redirection, substitution: /mythweb.php. Final.
>
> Bare in mind that rules are evaluated from top to bottom, so the order
> does matter.
> Good luck!
>
> On 15/09/2009, at 10:23, David Becerril wrote:
>
>> Hi everybody.
>>
>> I am trying to setup mythweb in cherokee, but i am unable to
>> configure the rewrite rules properly. I have a apache configuration
>> and lighttpd and trying to put those for cherokee.
>>
>>
>> The rules needed are the following:
>>
>>         "^/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" =>
>> "$0",
>>         "^/(pl(/.*)?)$" => "/mythweb.pl/$1",
>>         "^/(.+)$"       => "/mythweb.php/$1",
>>         "^/(.*)$"       => "/mythweb.php"
>>
>>
>> I tried to insert them just as a regular expression and redirection
>> as a handler. But the css, data, images, js, themes, etc are not
>> working properly.
>> What are the rules should I use?
>>
>> Thanks for your help.
>> _______________________________________________
>> Cherokee mailing list
>> Cherokee [at] lists
>> http://lists.octality.com/listinfo/cherokee
>
> --
> Octality
> http://www.octality.com/
>
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>



--
Saludos:
Antonio Pérez
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


email at davebv

Sep 15, 2009, 6:20 AM

Post #4 of 4 (382 views)
Permalink
Re: Making mythweb work [In reply to]

THanks!
I get 403 forbidden when I enter http://example.php (root domain) but if I
enter http://example.com/mythweb.php it works., so this is what I did.

Extension .php, handler FastCGI. Non-Final. (And already added the
environment variables)
Extension .pl, as CGI. Non-Final.
File Exists (any), handler Static content (which is the same as File?).
Final.
RegEx ^/(pl(/.*)?)$, handler Redirection, and in the regex, use internal and
substitution: /mythweb.pl/$1. Final.
RegEx ^/(.+)$, handler Redirection, Internal, substitution: /mythweb.php/$1.
Final.
Default: handler Redirection, (what to write in the regex field? or just
leave empty?) substitution: /mythweb.php. Final

So as I said, everything seems to work but the frontpage / whith gives me
403 forbidden.

By the way, thanks a lot for your help, this is great!

David.

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.