PDA

View Full Version : can i change my document root location??



bad_saint
03-05-2008, 09:07 AM
hi all,
i have an account on bluehost and im wondering if its possible to change my document root location, this because i want to install a php application framework and the documentation of it suggest that for security reasons i should change my document root location, an example of this would be the following:

current:
/public_html/ << curr document root

this would be the new stucture:
/app/config/
/app/controllers/
/app/plugins/
/app/public_html/ << this would be my new document root

thanks in advance

Believer
03-05-2008, 09:29 AM
I'd wager you are using cakePHP. If so, you do not need to change it the way the cake docs show you to use it in a production setting. You SHOULD be able to just put your app folder in the public_html directory, and the cake_xxx.xx.xx folder in the /home/youtUsername/ directory. Then modify the app/webroot/index.php file to point to the proper locations for the app and cake directories:


define('ROOT',DS.'home'.DS.'yourUsername'.DS.'publ ic_html');

define('APP_DIR','yourAppFolder');

define ('CAKE_CORE_INCLUDE_PATH',DS.'home'.DS.'yourUserna me'.DS.'cake_x.x.xx.xxxx');

If you upgrade versions or use different ones with different apps, just change this "CAKE_CORE_INCLUDE_PATH" to the cake library you wish to use, as long as it resides in the same directory (/home/yourUsername/) as the other one.
This setup SHOULD work, it works for me and it took me about a week of grinding my teeth to get it figured out. If you are not using cakePHP, please ignore this post. You don't need to modify any of the .htaccess files either, at least I didn't.
:D

~Cheers!

bad_saint
03-05-2008, 09:49 AM
yes, im using cakephp, that solved the problem i think ive been missing that part of the documentation:rolleyes:,

cheers