Thursday, October 30, 2008

Re: 1 Cake file, multiple apps / cake bake

First a little typo:
PATH=$PATH:/usr/local/bin:/Users/myUserName/Sites/Cake/1.2.x.x/cake/
console/
Remove the last "cake". The path should point to the folder not the
file.

Do I understand you correctly?
You want to have this kind of structure:
cake - the root
cake - where cake's core is
app1 - one of your apps
app2 - another app
app3 - yet another app

I do two things for these apps to work:
1. make a dns entry with a fake domain name in /ets/hosts
127.0.0.1 app1.site
127.0.0.1 app2.site
127.0.0.1 app3.site

2. add a vhost entry for each one in one of apache's config files.
I use Apples apache installation so I choose to do this in /etc/
apache2/users/martin.conf
First this: "NameVirtualHost *:80"
Then one of these for each site:
<virtualhost *:80>
DocumentRoot /Users/martin/Sites/cake/app1/webroot
ServerName app1.site
</virtualhost>
I also have a directory entry to allow override and such things for
all folders under cake's root.

When it comes to using cake console with these multiple apps I have
not found a better way than "cake -app /full/path/to/app". I read that
cd-ing to an app folder would make the console choose that folder
automatically but it hasn't worked for me. Neither has relative path
like "-app ."

/Martin


On Oct 29, 9:52 pm, gemmes <variouspix...@googlemail.com> wrote:
> Hi All,
>
> I have a windows tutorial which shows me how to create 1 cake folder
> that is used for all CakePHP localhost applications built(using WAMP).
> I am trying to set this up on my mac. Can anyone point me to a site
> that shows me this? or Can anyone tell me how to do this?
>
> I am trying to get this to work in cake bake app.
>
> Also, instead of typing this into terminal:    '/Users/myUserName/
> Sites/Cake/1.2.x.x/cake/console/cake' I want to type just 'cake
>
> I changed my .profile file to this as instructed elsewhere(but not
> working for me):
>
> ## DELUXE-USR-LOCAL-BIN-INSERT
> echo $PATH | grep -q -s "/usr/local/bin"
> if [ $? -eq 1 ] ; then
>     PATH=$PATH:/usr/local/bin:/Users/myUserName/Sites/Cake/1.2.x.x/
> cake/console/cake
>     export PATH
> fi
>
> pls help
>
> gemmes
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: