I have several domains (Users) on a VPS. When I did printenv, I noticed that Hestia has separate environment variables for each user. I couldn’t find where they are stored.
The thing is that I need to use my own environment variables with some users. The question is:
Where or how can I create my own separate variables for each user?
Hestia creates a file hestia.sh in dir /etc/profile.d/hestia.sh and it creates variable HESTIA and adds /usr/local/hestia/bin to PATH. I don’t know if you are seeing any other variables related to Hestia.
Will depend on the shell you are using but e.g. for bash you can add those variables to bash startup files, usually ~/.bashrc and/or ~/.bash_profile but it will depend whether you will use the shell interactively or not, more info here:
Yes, and how do I set my own variables? The thing is that I need, for example.
DB_HOST, DB_NAME, DB_PASS, the thing is that I can’t do them globally, since each site that uses databases, the DB_NAME and DB_PASS are different.
Is there a way to do it for each user that needs those variables?
@eris It would have to be done with composer, right?
I have other doubts here.
1.- Should I install Composer?
2.- Upload composer.json
3.- Upload composer.lock
4.- Upload the .env file. I don’t know at what level I should upload it, if within public_html or at the same level?