![]() |
multiple applications setup - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: multiple applications setup (/showthread.php?tid=63991) |
multiple applications setup - ronlin - 12-31-2015 Hi Folks, I am about to built a codeigniter website with a set of multiple applications . Regarding the directory layout I would like to follow codeigniter standards https://ellislab.com/codeigniter/user-guide/general/managing_apps.html and organize the applications accordingly. /codeigniter_root/application/appone /codeigniter_root/application/apptwo /codeigniter_root/application/appthree What I am missing in the user guide is how should we manage the access to multiple applications. The user guide mention only access to one specific application by defining “application_folder” in the config.php but the point is the access the application by adding application name as a suffix to the domain-name ex : http://domain-name/appone , http://domain-name/apptwo , http://domain-name/appthree and I don't see this explanation in the document. Could anybody point me to right direction? RE: multiple applications setup - John_Betong - 12-31-2015 After you have installed app one, app two and app three create three index.php files in each app one, app two and app three folders, all with a common $system_folder and relevant $application_folder $application_folder = "/appone/application"; // similar for app two and app three Edit: Have you thought about using sub-domains? RE: multiple applications setup - ronlin - 01-01-2016 Hi John, Yes the subdomains is IMO the best solution but I don't have access to virtual host settings and customer is explicitly asking for the above solution. I will try your advice and will get back here with the output. Thank you for your time. RE: multiple applications setup - josepostiga - 01-21-2016 Have you though about using $_SERVER variables where you can get the host that's trying to be accessed and then assign it's name to the $application variable that's in your root index.php file. You must use a system hook, also, to avoid/handle any errors with that workflow. Here, I'll share some of my work: https://gist.github.com/josepostiga/7d46c0addc69791705c5. Of course, you'll need to edit according to your specific needs, but I think will put you on the right track. |