Slim 3.0 is not working with php-fpm 7 and nginx. Return 404 -
i have set slim application on centos 7 php-fpm 7 , slimframework 3.0, nginx. here config:
location /projects/ { root /var/www/html; rewrite index.php/(.*)$ index.php?url=$1 last; index index.html $yii_bootstrap; try_files $uri $uri/ /$yii_bootstrap?$args /index.php$is_args$args; } location ~ \.php{ fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass php-fpm; fastcgi_index index.php; fastcgi_param script_filename $document_root$fastcgi_script_name; fastcgi_param script_name $fastcgi_script_name; include fastcgi_params; }
and
upstream php-fpm { #server 127.0.0.1:9000; server unix:/run/php-fpm/www.sock; }
however not working , returns 404 routes. test route is:
$app = new \slim\app(); $app->get('/cc', function ($request, $response, $args) { $response->write("dcmmm"); return $response; });
Comments
Post a Comment