Multiple Sites - minor questions

#1
[eluser]Gordaen[/eluser]
After reading quite a bit about CI, I've decided to give it a try. I'm halfway through redesigning a site, so I figured now is a good time to make the changes. I have a few questions before I get too far though.

I read a few past posts about running multiple sites/applications through CI, and I think I have decided to do mine this way:

/ci_path/application/sitename-dev/
/ci_path/application/sitename-live/

Obviously there will be quite a bit of overlap between the two, but it feels "safer" to keep the development site as a separate application. That way I can be as experimental as I want without too much worry. If everything is good on the dev site, I can copy over the appropriate libraries, views, etc. The naming convention should also make it clear/easy if I decide to modify more of my sites to use CI. Does that make sense?

Would it be best to create additional separate paths for logs, cache, etc. in order to help keep the sites separate? e.g., $config['log_path'] = '/ci_path/logs/sitename-dev/';

Is there any logical way of tying subversion in with all of this? Right now, the site is in a svn repository. I work on the dev site until everything is good and check in the changes. Then I just do an "svn up" on the live site. The way I have it now, however, is that a "settings.php" file is loaded that configures various settings (e.g., logging, database info, etc.). With CI, it makes more sense to just have the appropriate info in each "site's" config file, which would mean I obviously would not include that in the svn repository (unless I used svn hooks, but that's getting away from the simplicity I am going for). Does it make sense to use svn and just be very selective about which files are in the repository, or would it be better to have an auto-loaded config file, or some other option? I don't have to use subversion, I just find it extremely useful.

That's it for now. Thanks for reading such a long (and possibly rambling) first post Smile

#2
[eluser]Luci3n[/eluser]
I have also implemented multiple sites with one implementation of code igniter but my configuration was slightly different.

www/CodeIgniter (shared installation)

www/example1.com/application
www/example1.com/assets
www/example1.com/cache
www/example1.com/logs
www/example1.com/index.php
www/example1.com/.htaccess

www/example2.com/application
www/example2.com/assets
www/example2.com/cache
www/example2.com/logs
www/example2.com/index.php
www/example2.com/.htaccess

I had to make some small adjustment to index.php file slightly to allow for this at around line 85
Code:
if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }

    define('APPPATH', BASEPATH.$application_folder.'/');
}

but since this everything has worked perfectly and it is easy to upgrade and test newer version of codeigniter as they are released.

#3
[eluser]khuzaimi[/eluser]
that mean you have 2 separate /ci_1.x.x folder, right?

#4
[eluser]Michael Wales[/eluser]
Quote:that mean you have 2 separate /ci_1.x.x folder, right?

No, you would have only one folder per version of CI. If you are only using the latest version of the framework - that's all you would need on your server.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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