Environment variables are configuration options that can be set in a shell or other similar environments. All programs started from within the shell can read them and configure themselves.

learn more… | top users | synonyms

0
votes
1answer
5 views

How to override default `solr.home` in XML files under `Catalina/localhost`?

I'm trying to configure two instances of Solr on the same host and I'd like to override solr.home for each instance. I've created two files under Catalina/localhost/ as suggested in Solr Tomcat wiki: ...
1
vote
0answers
6 views

environment variable clientname scope on terminal server

I have a script that needs the CLIENTNAME environment variable, it runs on a terminal server. I have a batch file for testing that contains: set CLIENTNAME; pause If I RDP as an admin: If I open a ...
1
vote
0answers
15 views

apache: Send request URI within HTTP header for static files

To fulfil the requirements of the PubSubHubbub 0.4 spec, I have to send a rel=self header for each file. I'm now trying to do that with Apache's mod_headers and environment variables: Header append ...
0
votes
0answers
5 views

Can you remap/copy/alias environment variables to new ones in AWS elastic beanstalk?

Right now my database variables are defined as RDS_*, however I'd like to remap them to my app's conventions. This would help in avoiding writing AWS-specific detections inside of my project, which ...
0
votes
1answer
20 views

Using HaProxy environmental variables in haproxy.cfg not working

Trying to figure out why environmental variables in haproxy.cfg aren't working in HA-Proxy version 1.5.2 on the command line, using Printenv I get a list of environmental variables like ...
-1
votes
0answers
20 views

“Environment” not working in systemd unit file [duplicate]

I'm trying yo make Unit file for some software. I can't create variable for later use. Example: [Service] Environment="FOO=default_foo_value" ExecStart=/bin/service $FOO Seems legit. I saw many ...
1
vote
0answers
5 views

libexecdir in systemd .service file?

I'm deploying something to machines (internally, not for public consumption) using RPMs. Now, in RPM .spec files there's the %_libexecdir variable. The package deploys a service binary in that ...
1
vote
0answers
36 views

Use custom environment properties from Elastic Beanstalk for htaccess

Is there a way to use the custom environment property of elastic beanstalk in htaccess? I only want to rewrite http to https when not running locally so I thought I could do this by using the ...
0
votes
0answers
59 views

What is the difference between setting the environment variables in these 2 ways?

For a project I'm working on, we require nginx and lua, and we start it like this: MYVAR1=some_value MYVAR2=some_value /usr/local/openresty/nginx/sbin/nginx -p `pwd`/ -c nginx.conf And everything ...
2
votes
2answers
211 views

Can I use nginx environment variables within static files that nginx serves?

If I use a environment variable in the nginx config, and nginx is configured to serve only static files (html,js,css - e.g. a AngularJs app), is there any way I can use the environment variable within ...
2
votes
0answers
104 views

How to make Monit “check process” conditional inside docker based on docker run args?

I would like to make Monit's "check process" work conditionally based on an env variable. Here's the pseudo-code of what I would like to achieve(not a valid monit config syntax): [ -n "$run_foo" ] ...
1
vote
1answer
104 views

OpsWorks environment variables available to PHP CLI

We are deploying a Laravel-based application to AWS using OpsWorks. We have defined environment variables through the OpsWorks console and they are correctly seen by Apache. However, when running CLI ...
0
votes
3answers
76 views

Load users environment variables in a cronjob

How can I load the users environment variables in a cronjob? I have a cronjob which should start a script every minute on my Ubuntu machine: * * * * * /home/user/myscript.sh; In this script I ...
0
votes
1answer
87 views

Read user's environment variable in php script

I'm trying to query environment variables that i have set my .bashrc file (i'm running Ubuntu 14.04) in a PHP scripts that run's under Apache server. When i query the getenv('MY_VAR_NAME') or ...
1
vote
0answers
91 views

Environment variables using AWS CodeDeploy

I have a web application that utilizes environment variables for some of its configuration (DB credentials, API keys, etc). I'm currently using Elastic Beanstalk for deployment and can easily set ...
1
vote
2answers
49 views

Environment variable

I'm using setx to set a Environment variable. My command is setx -m PSR_NLC_FILE "%PROGRAMFILES(x86)%\Test Folder\" But when i check on my system is set to C:\Program Files (x86)\Test Folder" ...
0
votes
0answers
82 views

Nginx, pass environment variables through to FPM automatically?

Is there any way when running nginx from command line to have all environment variables defined at execution automatically propagate to FPM? Ideally without having to hard-code them in any config ...
2
votes
1answer
33 views

Tomcat installation, where to set environmantal variables?

I am working my way through the RUNNING.txt file for installing Tomcat. It says: (3.1) Set CATALINA_HOME (required) and CATALINA_BASE (optional) The CATALINA_HOME environment variable should be ...
1
vote
1answer
130 views

Environment variable not available in python

I have a pretty interesting problem regarding environment variables, and googling around didn't show me any meaningful results: $ echo $BUCKET && python -c "import os; print ...
1
vote
0answers
31 views

Load OpenMPI module for Apache httpd

How can I tell Apache httpd which version of MPI to use? I'm trying to run a Django web application under Apache httpd, and some of our pages make MPI calls with mpi4py. The problem is that I get an ...
2
votes
0answers
73 views

For sudo su - to retain SUDO_* environment variables?

We have a number of script (for Openstack operations) which require privileged execution in our environment. For some of the scripts we'd like to refer back to the USERNAME or UID of the person who ...
2
votes
0answers
395 views

How to retrieve a MDT task sequence variable and use it properly inside Powershell

I'm trying to retrieve a MDT task sequence variable inside a Powershell script, then use that variable in a Powershell function. My problem lies in that the variable I want to retrieve contains a ...
0
votes
1answer
287 views

Composer works as root but not as a common user, why?

I have installed Composer Globally as this docs shows and it works for root user on my server CentOS 6.6 but as a normal user lets said webvm user it doesn't saying that composer is not found (see ...
0
votes
1answer
184 views

Adding python to /usr/bin/env python variable [closed]

The #!/usr/bin/env python hashbang isn't working on my Ubuntu install. I tried the following: root@x# python=/usr/bin/python root@x# PATH=$PATH:/usr/bin/python
3
votes
3answers
228 views

Will a Local System service notice changes to environment variables in Windows 2008 R2 without a reboot?

Microsoft has a knowledge base article, last reviewed in June 2007, which states: If you update environment variables or add new environment variables, you must restart the computer before the ...
3
votes
1answer
283 views

netsh advfirewall set store gpo: %COMPUTERNAME% does not work

I am in charge of a group of computers that process highly confidential data. They cannot be connected to the Internet or even the company network, only a network drive. So I wrote a batch file on the ...
0
votes
1answer
310 views

Strange behavior with supervisor, gunicorn and Django

I have a really strange problem with supervisor and gunicorn. I read supervisor documentation, all the relevant blog posts, stackexchange questions but none of them solve my strange problem, and I ...
0
votes
1answer
32 views

Set env var for user as root

I'm on debian logged in as root and I am trying to set an env var for a specific user (not root). This is what I tried and didn't work: su - nginx -c export APP_SETTINGS='production.py' The error I ...
1
vote
0answers
98 views

mailx command strange behaviour from cron

I have a script that redirect the df output to a file and then send it in an email. The mail command is set up as following: /usr/bin/mail -s "Subject" -r from@nowhere.com toaddress@somewhere.com ...
0
votes
0answers
122 views

How to modify environment variable in Apache for CLI

I have a Zend framework 2 application which needs to be configured through an environment variable. On my local host (Windows) for example I set APPLICATION_ENV = local and with ...
0
votes
1answer
351 views

OpenSSH client sends environment variable it should not

I have a host that doesn't have the termcap entries for non-standard terminals and I cannot add them (policy). I use tmux which sets a terminal type to something that this device does not recognise. ...
2
votes
1answer
667 views

How can I use environment variables in haproxy.conf

My haproxy.cfg file has one backend servers using hostnames: backend servers server myapp ${PORTAL_PORT_3000_TCP_ADDR}:${PORTAL_PORT_3000_TCP_PORT} maxconn 32 myapp is running in other docker ...
2
votes
1answer
994 views

How to reload environment variables file in a running Docker container

I have a running container with an environment variables file mounted as such: docker run -d --env-file ./env.list my/image and everything is working well, now I have updated my ./env.list file and ...
0
votes
0answers
703 views

OpenVPN --route-up Missing environment variables when passing to script

I'm diving into the glory of OpenVPN and I'm having a bit of trouble manually configuring the routing tables. I'm on Arch Linux. I know OpenVPN automatically updates the routing tables when ...
1
vote
1answer
144 views

chroot 64 bit -> 32 bit = 'command not found'

Very obviously 32 bit cannot chroot to 64 bit but I am confident that I have successfully chrooted from 64 bit to 32 bit using Gentoo but when I [root@localhost ~]# mount /dev/vg_atom1/lv_root ...
1
vote
2answers
390 views

How to “recycle” the IIS process without rebooting the server?

Getting ASP.NET to see changes in PATH I've changed the environment PATH variable on my server and need IIS / W3WP (i.e. my ASP.NET app) to see this change. I understand from this other question's ...
0
votes
1answer
425 views

Setting enviromental variables for login shells under root account in FreeBSD

I am currently in the process of configuring Open Grid Scheduler in FreeBSD. As part of this process I need to set the environmental variableSGE_ROOTas root. To do this I have been experimenting with ...
0
votes
1answer
164 views

Apache: scope for environmental variables

While there's documentation available on Apache environmental variables, I can not find answer to one important question. Imagine I use rewrite rules to set environmental variable RewriteRule ... ... ...
1
vote
2answers
1k views

Change apache (PHP) $PATH environment variable on CentOS with cPanel [closed]

I need to add a path to $PATH environment variable for PHP scripts on CentOS linux server with cPanel Pro 1.0 and Apache 2.2.27. For Ubuntu or SuSE it just means adding the row export ...
-3
votes
2answers
96 views

How to set environment variables [closed]

Say, I would like to change my editor system-wide to nano. I was doing this with echo 'export EDITOR=/usr/bin/nano' >> /etc/bashrc As I learned, it was a bad idea, because if you accidentally ...
2
votes
2answers
266 views

Apache 2.2.14 / mod_auth_kerb 5.4 : Custom krb5.conf for Apache Instance

Objective: Use Apache/mod_auth_kerb using a custom krb5.conf file, not system standard /etc/krb5.conf. Issue: I've got a strongly regimented environment where we application owners are able to ...
0
votes
1answer
340 views

How to use a freshly installed environment variable in Windows

When I set an environment variable through the setx command in Windows 7, the variable is correctly set but if I type in set, it list the environment variables that were set at the script start up, ...
2
votes
1answer
100 views

Sharing ENV variables between multiple linux servers

I need to be able to share ENV variables between multiple linux servers. These variables are used by my application. I'd like to keep these variables in sync between all servers. Application ...
1
vote
1answer
186 views

Best practices for software configuration?

I'm configuring my AWS EC2 instances with Ansible, but I don't know what's the best way of storing my app configuration. Now I'm just sending a "app.properties" file to the server, using Ansible, but ...
2
votes
1answer
689 views

How can I use perfmon/logman to set up logging on a master (Windows) VM, writing to another machine on the network?

I know how to set up logging to write to a remote location in the general case - just specify the output filename using the full UNC path (e.g. \\HOST-PC\directory\logoutput.etl) when creating the log ...
1
vote
1answer
231 views

What core environment variables should be set for a Windows service?

When using a service manager like srvany or nssm to run a normal program as a service, you can set the program's environment using the registry as documented here: ...
3
votes
2answers
264 views

Managing Python versions with environment-modules

I'm trying to configure a RHEL6 server to allow multiple users to run multiple versions of Python, multiple versions of various python modules, and multiple versions of various other programs (e.g. ...
0
votes
1answer
304 views

order of operations for environment variables

I want to understand how environment variables are set and reset (overridden). I'm running Apache/2.2.24 (Unix) PHP/5.4.14 on a mac . My theory is this: Environment vars can be set in bash, then they ...
4
votes
1answer
1k views

How to load the environment variables at boot time before X11 on Ubuntu Precise?

Using Ubuntu Precise 64 bit, I'm facing a problem that I'm unable to solve and that I'll try to describe below: I'm using a console mode program (let's say abc) that uses Go, NodeJS, Java and Scala. ...
3
votes
0answers
119 views

grep is inconsistently defaulting to grep -P?

I have a script that does some housekeeping that works perfectly well when invoked from an interactive shell, but did nothing when invoked by cron. To troubleshoot this I started a shell with a ...