Here is how you do it in Cakephp 2.x
Once you have setup your webspace you don't need to change or spoil the php configuration (as long as php is set as default for this webspace) and when you create a web_space in Plesk, Plesk server normally does every thing for you.
But hen you need to configure CakePhp application in Plesk server you need to follow these:
When you Create a new DNS or web_space Plesk create a directory structure for you the you need to place your application in created directory and configure the htaccess in these folders as follows (just add some "/" in paths):
CakePHP root directory (must be copied to your document; redirects everything to your CakePHP app and updated to):
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ app/webroot/ [L] #to=> /app/webroot/
RewriteRule (.*) app/webroot/$1 [L] #to=> /app/webroot/$1
</IfModule>
CakePHP app directory (will be copied to the top directory of your application by bake):
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ webroot/ [L] #to=> /webroot/
RewriteRule (.*) webroot/$1 [L] #to=> /webroot/$1
</IfModule>
CakePHP webroot directory (will be copied to your application’s web root by bake):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L] #to=> /index.php
</IfModule>
Of-course you would need to configure your database.
To do so you need to setup a new Database for your application in you plesk server and then get the:
- database ip address
- database name
- database user name
- database password
and update your app/Config/database.php with the new database details. as you would know:
public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'ip address here',
'login' => 'database username',
'password' => 'database password',
'database' => 'database name'
);
Here is how to configure Cakephp 3.x
Hope this helps