Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Closed

Description
The Symfony "Best Practices" docs at
http://symfony.com/doc/current/best_practices/configuration.htmlrecommend
Moving Sensitive Options Outside of Symfony Entirely When dealing with sensitive options, like database credentials, we also recommend that you store them outside the Symfony project and make them available through environment variables.And point to
Learn how to do it in the following article: How to Set external Parameters in the Service ContainerFollowing/Reading at
How to Set external Parameters in the Service Container http://symfony.com/doc/current/cookbook/configuration/external_parameters.htmlthe docs provide an example for setting EnvVars for use when using Apache
"For example, if you're using Apache, environment variables can be set using the following VirtualHost configuration: ..."but avoid any example sufficient and correct for nginx, stating only
"The example above is for an Apache configuration, using the SetEnv directive. However, this will work for any web server which supports the setting of environment variables."The nginx/env pieces are here
https://docs.apitools.com/blog/2014/07/02/using-environment-variables-in-nginx-conf.htmlhttp://nginx.org/en/docs/http/ngx_http_perl_module.html#perl_sethttp://nginx.org/en/docs/ngx_core_module.html#envBut there needs to be a good nginx example -- that works -- to properly provide ENV vars so that
"Symfony will grab any environment variable prefixed with SYMFONY__ and set it as a parameter in the service container"