Phalcon and nginx - framework run only indexController

后端 未结 2 1461
抹茶落季
抹茶落季 2021-01-24 06:08

I am using Phalcon and Nginx, and i have a problem. When I go to http://myapp.dev/segmentation Phalcon should run SegmentationController and its indexAction() method. But instea

2条回答
  •  日久生厌
    2021-01-24 06:51

    Its the problem with location directive

    Use this configuration.

    location / {
            root   $root_path;
            index  index.php index.html index.htm;
    
            # if file exists return it right away
            if (-f $request_filename) {
                break;
            }
    
            # otherwise rewrite it
            if (!-e $request_filename) {
                rewrite ^(.+)$ /index.php?_url=/$1 last;
                break;
            }
    

    Hope this helps!

    Happy Coding !!!

提交回复
热议问题