# Environment variables ignored by Apache / NGINX / PHP-FPM

**URL:** <https://community.dynatrace.com/t/environment-variables-ignored-by-apache-nginx-php-fpm/16347>\
**Category:** Open Q&A\
**Tags:** nginx, php, apache\
**Created:** [October 14, 2018, 8:17pm UTC](https://community.dynatrace.com/t/environment-variables-ignored-by-apache-nginx-php-fpm/16347 "2018-10-14T20:17:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skrystosik](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/skrystosik/32/21133_2.png) [@skrystosik](https://community.dynatrace.com/u/skrystosik)\
**Post date:** [October 14, 2018, 8:17pm UTC](https://community.dynatrace.com/t/environment-variables-ignored-by-apache-nginx-php-fpm/16347/1 "2018-10-14T20:17:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mat\_cat\_adn](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mat_cat_adn/32/1553_2.png) [@mat\_cat\_adn](https://community.dynatrace.com/u/mat_cat_adn)\
**Post date:** [October 15, 2018, 9:47am UTC](https://community.dynatrace.com/t/environment-variables-ignored-by-apache-nginx-php-fpm/16347/2 "2018-10-15T09:47:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![d\_sarais](https://avatars.discourse-cdn.com/v4/letter/d/ecccb3/32.png) [@d\_sarais](https://community.dynatrace.com/u/d_sarais)\
**Post date:** [February 1, 2019, 10:23am UTC](https://community.dynatrace.com/t/environment-variables-ignored-by-apache-nginx-php-fpm/16347/3 "2019-02-01T10:23:54Z")

</div>

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
