cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Environment variables ignored by Apache / NGINX / PHP-FPM

skrystosik
DynaMight Guru
DynaMight Guru

Hi,

I'm playing with environment variables. I've set them on ubuntu host in /etc/environments. After host restart, proper environments DT_TAGS and DT_CUSTOM_PROP are properly read by goo processed that are detected by Dynatrace. Unfortunately nginx / PHP-FPM / apache are ignoring them. Is it something special I have to do, to make it work?

Regards,

Sebastian

 

Regards, Sebastian
2 REPLIES 2

mat_cat_adn
Advisor

Hello,

Nginx and Apache don't read in /etc/environment.

You must create file with your env vars in specifics files :

- Nginx : /etc/default/nginx

- Apache : /etc/apache2/envvars

For PHP-FPM, try to configure clear_env = no in configuration.

Regards,

Mathieu


d_sarais
Guide

Hi all, I'm doing the same but I would to find a solution that can be fitted for all processes.

Did you have find the right way?

Thanks a lot in advance


Featured Posts