Welcome Guest, Not a member yet? Register   Sign In
.env best practice for multiple applications
#1

I noticed when two CI4 applications are on the same server, parameters from one .env can affect a second application if the parameter name is the same and the user visits one application, then the other. Is the intent to use namespaces of some kind? In other words, instead of setting app.baseURL should I be setting appname1.baseURL and appname2.baseURL?
Reply
#2

Where are the two .env?

Only .env in ROOTPATH is loaded.
Reply
#3

(11-13-2021, 12:01 AM)kenjis Wrote: Where are the two .env?

Only .env in ROOTPATH is loaded.

Sorry, I was never notified of your reply. Here's the structure I have. I'm using separate system folders so the applications can be updated independently.

/var/www/html/app1/.env
/var/www/html/app2/.env

I guess this is just the nature of PHP environment variables.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB