How do I configure nginx rewrite rules to get CakePHP working on CentOS?

前端 未结 6 2086
清歌不尽
清歌不尽 2021-01-31 12:42

Hi somebody please help me out, I’m trying to setup a cakephp environment on a Centos server running Nginx with Fact CGI. I already have a wordpress site running on the server a

6条回答
  •  [愿得一人]
    2021-01-31 12:55

    I got this working:

    root DIR/app/webroot/;
    location / {
        index index.php index.html;
        rewrite ^/$ /index.php?url=/;
        if (!-e $request_filename) {
            rewrite ^(/.*)$ /index.php?url=$1 last;
        }
    }
    

    and then of course handlers for php and stuff...

提交回复
热议问题