So. I explain popularly. For he figured it out so far spent not 10 minutes. We make an example of a conventional site " Travel ".
I moved the CakePHP [ cakephp / cake and cakephp / vendors ] engine(!) To/var/www/cake.core (/ var / www I have apache wwwroot) - that is, this engine will be used for all projects and will not change until the next version of CakePHP.
The contents of cakephp / app / webroot aretransferred (!) To/ var / www / travel (in this folder we will have all css, images, js, uploads, etc.)
Everything from cakephp / app (there is no webroot there, we moved it from there last step) we transfer (!) To/var/www/travel.app (there we will have all the logic and templates. MVC, that is).
Configuration.
Everything is simple (as it turned out). Open the file /var/www/travel/index.php and edit the following block (comments are deleted): if (!defined('ROOT')) { define('ROOT', dirname(dirname(dirname(__FILE__)))); }
if (!defined('APP_DIR')) { define('APP_DIR', basename(dirname(dirname(__FILE__)))); }
if (!defined('CAKE_CORE_INCLUDE_PATH')) { define('CAKE_CORE_INCLUDE_PATH', ROOT); }
what would it look like this: // (!) apache wwwroot if (!defined('ROOT')) { define('ROOT', DS . 'var' . DS . 'www'); }
// (!) if (!defined('APP_DIR')) { define('APP_DIR', 'travel.app'); }
')
Now we write localhost / travel in the browser and see the test screen CakePHP, in which we are told that everything is connected and working.
Accordingly, for new sites, we make copies of / travel and /travel.app (or everything from the very beginning from the “clean” cakePHP), set up /travel/index.php and rejoice at the result.
PS Yes, yes, this is basically a translation of a piece of cakePHP manual, but either I'm stupid or it’s crooked, but I had to suffer a little to get what I got. And yes, cakePHP I study only a few hours, so do not judge strictly. By the way, if there are cakePHP experienced or novice users, then I would be very happy to make contact with you, because it is easier and faster together.