I know this subject have been treated before, but not with enough
clarity IMHO.

I read this post

http://groups.google.com/group/cake-php/tree/browse_frm/thread/94625f2803546def/31a623769c72ab66?rnum=1&_done=%2Fgroup%2Fcake-php%2Fbrowse_frm%2Fthread%2F94625f2803546def%2F3396b4b08ffb98ee%3F#doc_31a623769c72ab66

which claims it is possible to set up multiple CakePHP applications in
either of the following ways:

1.-Using virtual hosts
http://app1.domain.com/
http://app2.domain.com/
...

2.-A subfolder per application
http://www.domain.com/app1
http://www.domain.com/app2
...

3.-Subfolders per application within a parent folder
http://www.domain.com/some-folder/app1
http://www.domain.com/some-folder/app2
...

I am trying to setup a server for two or three applications (possibly
more in the future). This is the folder layout I plan to have:

~/webdev/mcv/cakephp        [here goes the shared cakephp release,
common to all apps]
~/webdev/mcv/apps/             [here are the applications folder, one
for each app]
~/webdev/mcv/apps/app1     [application #1]
~/webdev/mcv/apps/app2     [application #2]
...

Each of these app# folders have a webroot folder in it, of course.

And I want the urls to be:
http://myserver/mcv/app1
http://myserver/mcv/app2
...

I already managed to do this, with the following apache2 configuration

===APACHE START===
Alias /mcv/app1 /home/ernesto/webdev/mcv/apps/app1/webroot
Alias /mcv/app2 /home/ernesto/webdev/mcv/apps/app2/webroot

#
# Configure settings common to all applications
#
<Directory "/home/ernesto/webdev/mcv/apps/*/webroot">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>
===APACHE END===

I succesfully get the default CakePHP page for each after changing
CAKE_CORE_INCLUDE_PATH in each webroot/index.php like this:

define('CAKE_CORE_INCLUDE_PATH', '/home/ernesto/webdev/mcv/cakephp');

But in the HTML code I get in my browser all references to files
(images, CSS, js, etc.) are absolute to the root of my web server. That
is, the CakePHP logo image is referenced as /img/cake.logo.png instead
of /mcv/app1/img/cake.logo.png

Any ideas? Some obscure constant to configure? All constants storing
server-side filysystem paths are ok, but it seems that there is a
constant to set some sort of abstract base url path.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
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