php - Nginx rewrite / to subfolder -
i have server ispconfig + nginx + php, sets default webroot /{userdir}/web. have access folder only, , cannot change docroot in nginx.
most frameworks use subfolder docroot, example if install cakephp, docroot should set /{userdir}/web/webroot
but, because cannot change docroot, need make rewrite rules in nginx change going / go /webroot/ tried default rewrite rules cakephp, , works fine, because have index.php file in project root directory, maps out fine. problem example when trying access /favicon.png because of extension, needs served file, there no rewrite rules that. there magic rewrite rule, route subfolder if document root? here default rewrite rules cakephp recommends: https://book.cakephp.org/3.0/en/installation.html#nginx
Comments
Post a Comment