Welcome Guest, Not a member yet? Register   Sign In
How to Run/maintain "one" CI3 App hosted on multiple subdomains/ servers.
#3

(This post was last modified: 08-01-2019, 02:24 AM by bartMommens.)

(08-01-2019, 01:52 AM)mboufos Wrote: Hello,
i am working on a similar project with 1 x CI and N x Clients.
So to avoid all the maintanance on the CI i have 1 CI in 1 domain and all the clients has seperate segment.
so blabla.com/client1/"the rest of the site", the basic controller  is 1 and i have routes to avoid write the controllers etc.
so when client1 trying to access the site the route redirect the client1 to controller/client1 and in the controller i use the segmenet 1 to do the db connections etc.
I have an admin DB with all the info of the other dbs encrypted etc but I couldnt avoid the multiple databases for the clients.

But ofc if you do 1 mistake all sites will be down, but i guess if you have a demo page with the same configuration you can do the tests there and update the main page.

you can move the system and app folder outside of the main domain for safety reasons mostly ( check here https://www.codeigniter.com/user_guide/i...index.html ).

I am not sure if this is right or wrong Tongue heheheh

That's also (somewhat) an approach which came to me last night Smile but the base_controller is not an option for me.
My main is indeed the database connections, and custom config variables. Your approach with the admin DB and encrypted entries is very nifty. So you just encrypt them with a salt of some sorts and decrypt them in the php files?

I'm not sure about the right or wrong stuff either  Big Grin but thanks for sharing it helps in putting together a solution !
Reply


Messages In This Thread
RE: How to Run/maintain "one" CI3 App hosted on multiple subdomains/ servers. - by bartMommens - 08-01-2019, 02:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB