Re: Using 1 cake app to power multiple sites

2008-01-10 Thread jarmstrong


My recommendation is as follows. You build a handler in your core config file
+ the examples in the bakery to put together a setup that uses different
database configurations per domain. The number 1 issue i see with this is
getting your caching to work properly. Previously I did not see a way
without extending/writing a caching engine that used the same/similiar
domain based configuration to seperate out the caching per domain.

Hope that gives you some ideas.



Travis-27 wrote:
> 
> 
> Thanks for all the ideas, but I think everyone misunderstood my
> question.
> 
> I only want 1 app directory, running anywhere from 2 - 1000 websites.
> That way if a bug is found in lets say a blogController, one source
> code update is made, and all blogs are updated.
> 
> 
> 
> On Jan 10, 3:28 pm, Robby Anderson <[EMAIL PROTECTED]> wrote:
>> > This only works on hosts that allow you to point a (sub)domain to a
>> > particular directory of your choice. I know some have their own
>> generated
>> > directories they use. Just thought I put that out there.
>>
>> If you wanthttp://www.app1.comto point to the www/app1 directory
>> andhttp://www.app2.comto point to the www/app2 directory
>> (orhttp://app1.example.com
>> andhttp://app2.example.com), you are correct.
>>
>> But this setup works regardless domains/subdomains if you don't mind
>> the URLhttp://www.example.com/app1/,http://www.example.com/app2/,
>> etc. The webserver will just be looking for your app1/webroot/
>> index.php, which then loads the rest of the cake core based on the
>> CAKE_CORE_INCLUDE_PATH constant.
> > 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-1-cake-app-to-power-multiple-sites-tp14739287p14749297.html
Sent from the CakePHP mailing list archive at Nabble.com.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using 1 cake app to power multiple sites

2008-01-10 Thread Travis

Thanks for all the ideas, but I think everyone misunderstood my
question.

I only want 1 app directory, running anywhere from 2 - 1000 websites.
That way if a bug is found in lets say a blogController, one source
code update is made, and all blogs are updated.



On Jan 10, 3:28 pm, Robby Anderson <[EMAIL PROTECTED]> wrote:
> > This only works on hosts that allow you to point a (sub)domain to a
> > particular directory of your choice. I know some have their own generated
> > directories they use. Just thought I put that out there.
>
> If you wanthttp://www.app1.comto point to the www/app1 directory 
> andhttp://www.app2.comto point to the www/app2 directory 
> (orhttp://app1.example.com
> andhttp://app2.example.com), you are correct.
>
> But this setup works regardless domains/subdomains if you don't mind
> the URLhttp://www.example.com/app1/,http://www.example.com/app2/,
> etc. The webserver will just be looking for your app1/webroot/
> index.php, which then loads the rest of the cake core based on the
> CAKE_CORE_INCLUDE_PATH constant.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using 1 cake app to power multiple sites

2008-01-10 Thread Robby Anderson



> This only works on hosts that allow you to point a (sub)domain to a
> particular directory of your choice. I know some have their own generated
> directories they use. Just thought I put that out there.

If you want http://www.app1.com to point to the www/app1 directory and
http://www.app2.com to point to the www/app2 directory (or 
http://app1.example.com
and http://app2.example.com), you are correct.

But this setup works regardless domains/subdomains if you don't mind
the URL http://www.example.com/app1/, http://www.example.com/app2/,
etc. The webserver will just be looking for your app1/webroot/
index.php, which then loads the rest of the cake core based on the
CAKE_CORE_INCLUDE_PATH constant.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using 1 cake app to power multiple sites

2008-01-10 Thread AD7six



On Jan 10, 8:35 pm, Baz <[EMAIL PROTECTED]> wrote:
> Yep, that's basically it. Look up in the manaul.cakephp.org and look at the
> production setup.
>
> This only works on hosts that allow you to point a (sub)domain to a
> particular directory of your choice.

How does that affect things one way or the other?

So long as you are able to edit the index.php file and change the
paths to /go/ where you want to put your app/cake files, you're
laughin. or is that what you meant by "own generated directories"?

> I like the different versions of cake idea also...I usually have everything
> running off of one source and have to upgrade all sites at the same time.

Ooo that could hurt ;)

AD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using 1 cake app to power multiple sites

2008-01-10 Thread Baz
Yep, that's basically it. Look up in the manaul.cakephp.org and look at the
production setup.

This only works on hosts that allow you to point a (sub)domain to a
particular directory of your choice. I know some have their own generated
directories they use. Just thought I put that out there.

I like the different versions of cake idea also...I usually have everything
running off of one source and have to upgrade all sites at the same time.

On Jan 10, 2008 11:36 AM, Robby Anderson <[EMAIL PROTECTED]> wrote:

>
>
> I've got that going right now, based on a blog post or an article.
>
> Basically, I've got a directory like this:
>
> web
> - app1
> - app2
> - src
>  - cake.v1
>  - cake.v2
>
> I put my full versioned cake install into the source directory (right
> now I have cake_1.2.05875-pre-beta and cake_1.2.06311-beta, for
> example). Then I copy just the app folder to app1, app2, etc.
>
> Then all you have to do is point each application to your codebase.
> You can do this in your app/webroot directory by changing the lines
> containing CAKE_CORE_INCLUDE_PATH in your index.php and test.php (you
> could also centralize it into a single setting that both read from,
> but changing both lines is pretty easy). So currently in my index.php
> it reads:
>
>  define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'src'. DS .
> 'cake_1.2.0.6311-beta');
>
>
> This allows you to have multiple apps, each running different versions
> of cake (not that you'd want to - but you could), and allows you to
> switch between versions quickly and easily. If you move to a new
> version and it bombs, you can quickly move back.
>
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Using 1 cake app to power multiple sites

2008-01-10 Thread Robby Anderson


I've got that going right now, based on a blog post or an article.

Basically, I've got a directory like this:

web
- app1
- app2
- src
  - cake.v1
  - cake.v2

I put my full versioned cake install into the source directory (right
now I have cake_1.2.05875-pre-beta and cake_1.2.06311-beta, for
example). Then I copy just the app folder to app1, app2, etc.

Then all you have to do is point each application to your codebase.
You can do this in your app/webroot directory by changing the lines
containing CAKE_CORE_INCLUDE_PATH in your index.php and test.php (you
could also centralize it into a single setting that both read from,
but changing both lines is pretty easy). So currently in my index.php
it reads:

 define('CAKE_CORE_INCLUDE_PATH', ROOT . DS . 'src'. DS .
'cake_1.2.0.6311-beta');


This allows you to have multiple apps, each running different versions
of cake (not that you'd want to - but you could), and allows you to
switch between versions quickly and easily. If you move to a new
version and it bombs, you can quickly move back.



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---