Multi-site CakePHP configuration for Mac
This is the CakePHP configuration I use for development websites on my MacBook Pro.
My project structure for CakePHP is to move the webroot directory out of the app and rename it “public” which is the webroot for Apache on my production web server. I also move the Cake directory to /Users/mike/Sites/cake/<version_number>/ so that can be used by multiple websites.
Directory structure
<project_name>
-app
-public
-img
-js
-css
index.php
<?php if (!defined('ROOT')) {
define('ROOT', DS.'Users'.DS.'mike'.DS.'Sites'.DS.'<project_name>');
}
if (!defined('APP_DIR')) {
define('APP_DIR', 'app');
}
define('CAKE_CORE_INCLUDE_PATH', DS.'users'.DS.'mike'.DS.'Sites'.DS.'cake'.DS.'2.4.0'); ?>