Sunday, July 20, 2008

Tips for configuring nginx for cake php



Here are the rewrite rules to use for nginx, seems that i will need to solve the img problems

http://blog.timperrett.com/2008/4/17/nginx-engine-x-rewrite-rules-for-cakephp


location / {
root /var/www/cake/app/webroot;
index index.php index.html;
# If the file exists as a static file serve it
# directly without running all
# the other rewite tests on it
if (-f $request_filename) {
break;
}
if (!-f $request_filename) {
rewrite ^/(.+)$ /index.php?url=$1 last;
break;
}

here is my nginx config that you can take as example

http://github.com/mariuz/firebird_scripts/tree/master/nginx/nginx.conf

2 comments:

Popa Adrian Marius said...

seems that i have to make rewrite rule to poit to

app/webroot/

Popa Adrian Marius said...

i will fix it soon