Create phalcon project inside phalcon project in nginx web server

I create phalcon project inside of phalcon project. example, i already have phalcon project in my domain and then i create project on


/tbf is my new phalcon project wich contain folder app and public. I have succeeded to show my home new phalcon project with url but, when i access controller like it's only show error 404 Not Found with nginx error :

[error] 10048#10048: *1 open() "/main_phalcon_project/public/sample/tbf/public/asdf" failed (2: No such file or directory)

and here is my nginx conf :

server {
  listen       443 ssl http2;

  set $root_path 'main_phalcon_project/public';

  root   $root_path;
  index  index.php index.html index.htm;

  try_files $uri $uri/ /index.php?_url=$uri&$args;

  error_page   500 502 503 504  /50x.html;
  location = /50x.html {
      root   /usr/share/nginx/html;

  location /robots.txt {
      add_header Content-Type text/plain;
      return 200 "User-agent: *\nDisallow: \n";
  location ~ ^/(sitemap.xml) {
      root $root_path;
  location @tbf {
      rewrite ^/tbf/public(.+)$ /index.php?_url=$uri&$args; 

  location /sample/tbf/ {
      root 'main_phalcon_project/public/sample/tbf/public';
      index index.php index.html index.htm;

      if ($uri !~ ^/sample/tbf/public) {
          rewrite ^/sample/tbf(.*)$ /sample/tbf/public$1;
      try_files $uri $uri/ @tbf;

  location ~ \.php$ {
      fastcgi_split_path_info       ^(.+\.php)(/.+)$;
      fastcgi_index  index.php;
      fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
      include        fastcgi_params;

This isn't how to use an MVC application, you should read the docs of how to use a MVC application properly