On Thu, Feb 10, 2011 at 5:10 PM, alexpes <[email protected]> wrote:
> I would install cakephp on plesk with this folders structure:
>
> /httpdocs/ <- documentroot
> /httpdocs/app
> /httpdocs/cake
>
> I know it's not canonical structure but, for security reason, is it
> sufficient put this .htaccess...
>
> Order Allow,Deny
> Deny from All
>
> ...in app and cake folder? So doing app and cake folders are not
> accessible or not?
> Thank you very much.

Create a file, /var/www/vhosts/<your domain>/conf/vhosts.conf with the
following:

DocumentRoot /var/www/vhosts/<your domain>/httpdocs/app/webroot/

<Directory "/var/www/vhosts/<your domain>/httpdocs/app/webroot/">
        Options FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
        
        DirectoryIndex  index.php index.html

        <IfModule mod_rewrite.c>
                RewriteEngine On
                RewriteCond %{REQUEST_FILENAME} !-d
                RewriteCond %{REQUEST_FILENAME} !-f
                RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
        </IfModule>
</Directory>

This resets the DocumentRoot to be the webroot dir.

By disabling .htaccess (AllowOverride None) and putting the
mod_rewrite lines in vhost.conf, you'll shorten request respone time.

Update Plesk's files:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<your domain>

I'm pretty sure that that also takes care of getting Apache to reload.

Change <your domain> and any other path segment as appropriate.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to