I am setting up a local, staging and production environment of Magento 2 that I am deploying from a git repo. My plan is to move the env.php with the repo and just use environmental variables. I am a little lost how to do this with best practices.

The local is running thru MAMP. The staging and production are Cloudflare. Both are nginx. Cloudflare has a Plesk backend that seems to override a lot of the .conf files. So not sure the best method for there and MAMP.

I thought for setting them up using fastcgi_params in the nginx.conf file in the Magento root directory but it does seem to be working.

Does anyone know the method for doing this? And how would you call them in the env.php?

Any help is greatly appreciated.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.