Multi-Site Framework For CodeIgniter CMS Application

I am building an application on top of the CodeIgniter framework. This will be a personal CMS for my company’s projects.

What I would love to do is keep the application separate from the folders that our clients are able to access for our website. Essentially, I’d love a layout as follows:

/applications
/system
/public_html
  - site1.com
  - site2.com
  - etc

When someone hits site1.com, it would use site1.com’s DB config to pull in the settings and information that I have outlined for that website, but access the application from the applications folder.

Obviously, this is back a few levels from the domain, and I’ve run into issues with that kind of layout before… I’d love for the user to only have to worry about the following in their folder (for now):

/site1.com
  - db.php (config file)

They would update the db.php with their information, and when someone visits site1.com, they will be served up the application from the applications folder with the settings pulled in from their db. Eventually, I’ll add a way for them to upload views and assets unique to their website as I build out the application to allow those things.

So…

What is the proper (and best) way to go about doing this, while maintaining ONE framework for my application that I can keep on my server?

Additionally, if you’d like to give some helpful input, what are the advantages and disadvantages of doing something like this?

Thanks!

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories