Welcome Guest, Not a member yet? Register   Sign In
Multisite CI installations - HOW TO
#11

[eluser]developer10[/eluser]
[quote author="paulc010" date="1272312641"]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.[/quote]

thats actually is the correct directory structure (since in my cPanel i can set the folder "public_html/site1" to be the root for my subdomain).

All i want to know is whether or not this is possible. i know i have to duplicate the index.php file in each app folder so that's no problem.

If there's anyone who succeeded in doing this, please confirm everything works fine.

For whats said in the above post about not being able to share libraries unless they're in main library folder - thats exactly where i would put
them so every app can benefit from it if needed.
#12

[eluser]paulc010[/eluser]
I always move the system and application directories out of the site document root, so yes. It works. :-)

Paul




Theme © iAndrew 2016 - Forum software by © MyBB