HowToDoMultipleSitesWithSingleCore (diff)

You must first sign up to be able to contribute.

Changes from Version 1 of HowToDoMultipleSitesWithSingleCore

drmikecrowe (IP:
10/18/07 18:45:00 (10 years ago)



  • HowToDoMultipleSitesWithSingleCore

    v0 v1  
     1= Multiple Sites Based on Identical Configurations = 
     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: 
     5 * 
     6 * 
     7 * 
     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 
     12 * You now have 2-n different caches/logs to monitor.   
     14If you look at a typical Symfony directory structure, it can be broken up to two type groups: 
     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 
     30Here are the steps I took: 
     32 * Develop the 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 
     44Feel free to comment/email/irc 
     45irc handle:  drmikecrowe 
     46email:  drmikecrowe[at]gmail[.]com