I am trying to set some environment variables in nginx through its configuration file. I am using nginx / 0.8.53 and it does not work.
server {
listen 80;
server_name localdictus;
root /opt/vdmo_dictus/public;
passenger_enabled on;
rails_env development;
env VDMO_MANDANT = "somevalue";
}
This error message is:
unknown directive "env" in /opt/nginx/conf/nginx.conf:43
The documentation tells me that there is an "env" command ... so what am I doing wrong?
http://wiki.nginx.org/CoreModule#env
setting environment variables through export to the shell is not an option for my application. By the way
Here are the lines:
37: server {
38: listen 80;
39: server_name localdictus;
40: root /opt/vdmo_dictus/public; # <--- be sure to point to 'public'!
41: passenger_enabled on;
42: rails_env development;
43: env VDMO_MANDANT = "somevalue";
44: }
Hi,
Alex
source
share