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

Popular posts from this blog

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -