Can't access environment variables on Ubuntu

Hi,

I have added an environment variable APP_ENV=“DEVELOPMENT” to my /etc/environments and to my VirtualHost in apache.
With PHP I can directly access these variable, but I am been struggling with the latest lucee 5.2.3.35.
I can see my variables in the CLI when I run $ env. But when I dump ‘server’ in a CFC or CFM file and I look under ‘System.environment’ the values do not show up.
I am certain these values are also visible for the root process which might be running Tomcat.
Is there something I am doing wrong?

I don’t believe Apache environment variables are passed through the proxy. However since you’re sure your system variables are available to the shell Tomcat is using, you should be able to access them using Ben Nadel’s method here:

Hi @Mattijs_Spierings,

Environment variables normally get & set with the servlet engine itself. Please refer below link

Hi,

I was able to add into /opt/lucee/tomcat/bin/setenv.sh and that works.
However, on Stackoverflow someone is suggesting Rather than create /usr/share/tomcat8/bin/setenv.sh, you can put those settings in /etc/default/tomcat8.

Since we are not using tomcat8, how should I call the file in my default folder?
I rather put it /etc/default then in my tomcat installation folder since this can be removed/updated.