• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multisite CI installations - HOW TO

#9
[eluser]paulc010[/eluser]
I'm confused. Maybe it would be better if you described the directory structure? If you're using cpanel with the usual "add-on" domains you could have the directories for each site in public_html:

Code:
public_html/
  |
  |-site1/
  |
  |-site2/
  |
  |-site3/

So the document root for sub1.mysite.com is public_html/site1

If that's the case then you install the codeigniter system in public_html, and place the applications, main index.php file and all your asssets one in each subdirectory. This gives:

Code:
public_html/
  |
  |-system/
  |
  |-site1/
    |
    |-application1
  |
  |-site2/
    |
    |-application2
  |
  |-site3/
    |
    |-application3

Now you have a single copy of the codeigniter system, and one application in each "site" folder. In the index.php in each site subdirectory you just need to set:

$system_folder = "/full/path/to/public_html/system";
$application_folder = "applicationX";

Note that you can't share libraries between the applications this way unless you place them in the public_html/system/libraries directory and so on. You could try to go further and move the common application files into a directory in public_html (above the subdomain directories) and then use hard links to allow each application to use the same directories for libraries, plugins etc. but obviously not config, constrollers, views etc.

Is this what you mean?

Paul
EDIT: thinking on it using linked directories to "remap" common application folders would likely cause some real headaches.


Messages In This Thread
Multisite CI installations - HOW TO - by El Forum - 04-25-2010, 07:19 AM
Multisite CI installations - HOW TO - by El Forum - 04-25-2010, 08:15 AM
Multisite CI installations - HOW TO - by El Forum - 04-25-2010, 08:19 AM
Multisite CI installations - HOW TO - by El Forum - 04-25-2010, 08:39 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 01:03 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 01:24 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 03:09 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 08:35 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 09:10 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 09:22 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 09:43 AM
Multisite CI installations - HOW TO - by El Forum - 04-26-2010, 09:45 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.