Development

HowToDoMultipleSitesWithSingleCore (diff)

You must first sign up to be able to contribute.

Changes from Version 1 of HowToDoMultipleSitesWithSingleCore

Show
Ignore:
Author:
drmikecrowe (IP: 199.222.167.248)
Timestamp:
10/18/07 18:45:00 (10 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToDoMultipleSitesWithSingleCore

    v0 v1  
     1= Multiple Sites Based on Identical Configurations = 
     2 
     3This may be a strange topic, but I wanted to configure our access into subdomains, all with SSL access.  We needed different sites because SSL forces IP based virtual domains, which meant different document roots for us.  Such as: 
     4 
     5 * www.mydomain.com 
     6 * admin.mydomain.com 
     7 * parents.mydomain.com 
     8 
     9However, these were all sites with the same core schema and plugins.  The advantage of this configuration is: 
     10 * Shared model files:  All the !XxxPeer classes will be linked across applications 
     11Disadvantage: 
     12 * You now have 2-n different caches/logs to monitor.   
     13 
     14If you look at a typical Symfony directory structure, it can be broken up to two type groups: 
     15 
     16 * __Common Directories__: 
     17  * batch 
     18  * config 
     19  * data 
     20  * doc 
     21  * lib 
     22  * plugins 
     23  * test 
     24 * __Application Specific Directories__: 
     25  * apps 
     26  * cache 
     27  * log 
     28  * web 
     29 
     30Here are the steps I took: 
     31 
     32 * Develop the www.yourdomain.com schema and site.  Once this is starting to come together, you can start to develop the additional sites. 
     33 * In the new site, symbolic link the __Common Directories__ 
     34 * In the new site, create the __Application Specific Directories__ 
     35   * NOTE: In the __web__ directory, you may need to copy some of the original contents (css, js, and .htaccess files come to mind).  Keep this in the back of your mind as you start to bring up the new site. 
     36 * Run the command **symfony fix-perms** 
     37   * NOTE: For me, Virtualmin creates these new sites with new usernames.  You will have to insure that all the __Application Specific Directories__ are owned by that username, so your clear-cache commands and logging commands work. 
     38 * Now, you have a the project configured.  You start by doing: 
     39   * symfony app MYAPP 
     40   * symfony module MYAPP MYMODULE 
     41   * ...  
     42 * You will now find that your apps/MYAPP/modules/MYMODULE has been created, and you have full peer access to the entire database 
     43 
     44Feel free to comment/email/irc 
     45irc handle:  drmikecrowe 
     46email:  drmikecrowe[at]gmail[.]com 
     47