I create phalcon project inside of phalcon project. example, i already have phalcon project in my domain pradha.id and then i create project on
phalcon_project_folder/public/sample/tbf
/tbf is my new phalcon project wich contain folder app and public. I have succeeded to show my home new phalcon project with url pradha.id/sample/tbf but, when i access controller like pradha.id/sample/tbf/asdf 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;
server_name www.pradha.id;
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_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}