I am working only with nginx, and everything works ok. Check my config:
server {
server_name domain.tld;
root /home/domain.tld/public;
index index.php index.html index.htm;
error_log /home/domain.tld/error.log;
location / {
try_files $uri $uri/ /index.php?&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/home/domain.tld/domain.tld.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "open_basedir = /home/domain.tld:/tmp";
}
}
php-fpm pool
[domain.tld]
listen = /home/domain.tld/domain.tld.sock
user = www-data
group = www-data
pm = dynamic
pm.max_children = 10
pm.start_servers = 2
pm.min_spare_servers = 2
pm.max_spare_servers = 4
chdir = /
$router.php
$router = new Phalcon\Mvc\Router();
$router->setUriSource(\Phalcon\Mvc\Router::URI_SOURCE_SERVER_REQUEST_URI);
$router->removeExtraSlashes(true);
$router->setDefaultController('index');
$router->setDefaultAction('index');
return $router;