0

Is there any way when running nginx from command line to have all environment variables defined at execution automatically propagate to FPM? Ideally without having to hard-code them in any config files?

I'm hoping to see if there's a solution that doesn't involve adding any tools, I'm aware of hacks/workarounds using sed, although my hope is to not add complexity.

3
  • 3
    This is not done by default for security reasons. You should very carefully consider whatever the problem is you're trying to solve; there is almost certainly a better way. Feb 1 '15 at 2:42
  • I could see that, although when running inside a docker container, the only env I have set are things pertaining to my hosting configuration. Feb 1 '15 at 14:44
  • The content of this article will help you. gist.github.com/CMCDragonkai/50739cd498d2ae5d2075e25528bf8751 Jun 4 '18 at 13:38

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.