Rayed's Real Life

FreeBSD, Linux, Apache, PHP, MySQL, and very little of my life ;)

CakePHP under Lighttpd

8 comments

After moving alriyadh.com to Lighttpd I had some problem making a CakePHP application I wrote to work properly.

I searched the net for a solution and I found this post, but unfortunately the solution they proposed didn’t work, I spent several hours trying to make it work until I gave up, I decide to do it from scratch and luckily it worked.

The mod_rewrite rules I used in lighttpd.conf file:

url.rewrite-once = (
"^/cake/(css|files|img|js|stats)/(.*)$" => "/cake/app/webroot/$1/$2",
"^/cake/(.*)$" => "/cake/app/webroot/index.php?url=$1"
)

Where cake is you cakePHP application.

I tried to login and add a comment to the CakePHP Bakery site, but I got an error when I try to comment!

Written by Rayed

February 9th, 2007 at 11:28 pm

Posted in PHP,UNIX,alriyadh.com

8 Responses to 'CakePHP under Lighttpd'

Subscribe to comments with RSS or TrackBack to 'CakePHP under Lighttpd'.

  1. Thanks for this, only one that worked for me :D

    Shaun

    5 Apr 08 at 4:46 am

  2. You are welcome :)

    Rayed

    5 Apr 08 at 10:51 am

  3. Hey,
    That worked like a charm. Thanks.
    Cheers

    Developer

    30 Jun 08 at 6:51 pm

  4. Cant make it work.=(

    Ian V

    31 Oct 08 at 10:02 am

  5. Thank you rayed!

    THIS was the right solution for me.

    If you did not mind, then I would like to write this also in my geman blog.

    Christoph

    18 Mar 09 at 9:43 am

  6. Sure, glad it work for you

    Rayed

    18 Mar 09 at 2:01 pm

  7. Thx that’s work on lighty 1.4.19 with cakephp 1.2.2.8120

    titoi

    21 Apr 09 at 12:08 am

  8. thx Man.. worked like a charm

    priki

    18 Jun 09 at 1:13 pm

Leave a Reply

Powered by WP Hashcash