I am using cakephp + winNMP (nginx+mariadb+php), I have successfully run the web on nginx. http://localhost I want to run a similar cakephp code in a subdirectory. eg: http://localhost/subfolder My directory structure is :
link image Is config nginx :
root "c:/winnmp/www/huyquangltd";
autoindex on;
location ~ \.php$ {
#try_files $uri =404;
include nginx.fastcgi.conf;
include nginx.redis.conf;
fastcgi_pass php_farm;
fastcgi_hide_header X-Powered-By;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
http://localhost/ <-- ok
http://localhost/subfolder <-- not ok
Please help me or have any ideas!
Thank you
link image Is config nginx :
root "c:/winnmp/www/huyquangltd";
autoindex on;
location ~ \.php$ {
#try_files $uri =404;
include nginx.fastcgi.conf;
include nginx.redis.conf;
fastcgi_pass php_farm;
fastcgi_hide_header X-Powered-By;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
http://localhost/ <-- ok
http://localhost/subfolder <-- not ok
Please help me or have any ideas!
Thank you