Saturday, 1 April 2017

Environment variables readable by Apache/PHP and Systemd/node

On the same server, I have a apache php application and a nodejs application (started via systemd).

For systemd/node, I put the following config:

[Service]
EnvironmentFile=/etc/environment

For apache, I have put the following line in /etc/apache2/envvars

. /etc/environment

My problem is:

  • It works in PHP and standalone node if I put export before each variable, but not in node via systemd
  • It works in node via systemd if I remove the export

Is there a way for me to write these variables in a single place that can be used by Apache/PHP and node started via systemd ?



via abd

No comments:

Post a Comment