Created
March 3, 2011 22:05
-
-
Save dogmatic69/853711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My normal setup... (many cake sites from one cake install) | |
-------------------------------------------------------------------------------- | |
sudo apt-get install php5-dev mysql-server apache2|cherokee etc | |
cd /var/www | |
mkdir frameworks | |
cd frameworks | |
git clone git://github.com/cakephp/cakephp.git cakephp/ | |
# you could run different versions by cloaning things a few times | |
git clone git://github.com/cakephp/cakephp.git cakephp1.2/ | |
cd cakephp1.2 | |
git checkout 1.2 | |
git clone git://github.com/cakephp/cakephp.git cakephp1.3/ | |
cd cakephp1.3 | |
git checkout 1.3 | |
etc | |
/var | |
/www | |
/frameworks | |
/cakephp <- git repo | |
/cake | |
/plugins | |
/vendors | |
/sites | |
/site1.com | |
/public_html | |
<files from cake app dir> | |
/webroot <- if you can, set this as webroot | |
index.php | |
app_controller.php etc | |
/site2.com | |
/public_html | |
<files from cake app dir> | |
/webroot <- if you can, set this as webroot | |
index.php | |
app_controller.php etc | |
# add the following line to php.ini | |
# this will allow you to add cake sites without having to change anything in index.php | |
# normally you change CAKE_CORE_INCLUDE_PATH but not anymore, if you cant change this... | |
include_path = "/var/www/frameworks/cakephp/" | |
# then create a vhost that is something like the following (for apache) | |
# save this to /etc/apache/sites-available/site1.com | |
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName site1.com | |
DocumentRoot /var/www/sites/site1.com/public_html/webroot/ | |
<Directory /var/www/sites/site1.com/public_html/webroot/> | |
Order Deny,Allow | |
Deny from all | |
Allow from 127.0.0.0/255.0.0.0 ::1/128 | |
</Directory> | |
ErrorLog /var/www/sites/site1.com/logs/error.log | |
</VirtualHost> | |
# add it to enabled and then restart | |
sudo a2enmod site1.com | |
sudo serivce apache2 restart | |
# alternative setup might work if you cant change your webroot | |
# make sure you have follow symlinks, ive not tested, but should work. | |
/var | |
/www <- webroot that cant change | |
/* symlinked files */ <-----------------------<----------------------<----------------------------<------------------- | |
/frameworks | | |
/cakephp <- git repo | | |
/cake | | |
/plugins | | |
/vendors ^ | |
/sites | | |
/site1.com | | |
/public_html | | |
<files from cake app dir> | | |
/webroot >---------------------->---------------------------->---------------------->------------- | |
index.php | |
app_controller.php etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment