Questions tagged [environment-variables]

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.

Environment variables are key-value-pair configuration options like KEY=valueor FOO=bar. Environment variables allow you to configure a program before it gets executed and without the need to store these variables in proprietary configuration files.

They are present on all POSIX systems (Unix, Linux, BSD, Mac OS, DOS, Windows, ...). Environment variables can be set by any shell and read by nearly any programming language.

Some programming languages allow you to set Environment variables, but they only persist within the current process. You can't set them to be visible by the calling shell. So they are not useful for inter-process communication.

410 questions
2
votes
1 answer

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 I'd like to remove that from my source control.…
2
votes
1 answer

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 job. However, a problem arises when new Virtual…
2
votes
3 answers

Dynamic logic in environment variable?

I regularly invoke a particular remote server from a (Linux/bash) command line via tools like cURL or wget. This server requires an authentication token that expires every 10 minutes. I have a program that can generate a new token. What I would like…
2
votes
2 answers

Equivalent of PHP setlocale in an APACHE config file

I need to display a date in french locale. A solution is to use setlocale(LC_TIME, 'fr_FR'); But I'm looking to set the locale directly in the configuration of my apache server. In the /etc/httpd/conf/httpd.conf file, I tried
Nicolas
  • 387
  • 2
  • 5
  • 12
2
votes
1 answer

Where to export a truly global environment variable?

I want to set an environment variable that will be visible to all processes launched by Upstart. This is on a CentOS system, but I presume the same applies to Ubuntu given that they both use Upstart. Somewhere in /etc/init/ perhaps? Note that…
Socio
  • 150
  • 1
  • 7
2
votes
1 answer

Puppet Can't Start Service That Can Be Started By Hand?

On Debian, I have written a simple init script for a Pyramid application using pserve. I am not 100% sure that it is complete/correct, but it works for now: DAEMON="/home/project/.virtualenvs/project/bin/pserve…
2
votes
1 answer

Forward Shibboleth Environment Variables to Tomcat via Apache

I am using Shibbolethv2.3 with Apache web server and Tomcat application server. I am using Apache as a reverse proxy using mod_proxy.so. I am not able to forward the Shibboleth environment variables from Apache to Tomcat. I am able to forward the…
dsr
  • 141
  • 2
  • 5
2
votes
1 answer

Setting Apache's PATH environment to match users

Using PHP 5.3 as an Apache module with Apache 2, on OS X 10.7. When I open Terminal and enter echo $PATH I…
Jack Sleight
  • 211
  • 2
  • 8
2
votes
4 answers

how to set php SERVER_PORT var to 80, behind varnish?

how to force php to read SERVER_PORT as 80, when apache listens on 8080 and varnish listens on 80 ?? if my apache vhost is set to 8080, SERVER_PORT will always be 8080, this is troubling me a little since in many parts of the application some links…
Daniel
  • 43
  • 1
  • 4
2
votes
3 answers

Using Apache Environment Variables to set custom ErrorDocument

I've got a set of RewriteCond rules that test for various mobile devices and then set environment variables like "env=device:.iphone" or "env=device:.smartphone" if the useragent matches an iPhone or Android device. I'm trying to now redirect the…
Tad
  • 133
  • 2
  • 11
2
votes
1 answer

Set environment variable for process spawned by Apache webserver

How can I set an environment variable (not an "Apache environment variable", as described in the Apache HTTP server documentation here, but a plain old operating system environment variable) for processes spawned by Apache HTTP server? I have a…
argentpepper
  • 121
  • 2
2
votes
1 answer

ulimit equivalent for all of a user's processes?

I am the unpopular guy who has brought down our high-memory linux machine twice this past week because some processes I have been running ate up way more ram then expected. One way around this would be to set a per process ulimit so if each process…
2
votes
1 answer

how do I change the path for non-admin user in windows 7

In Windows XP I could change the PATH variable in the Control Panel / System Tool. When I start "System" in the Win7 Control Panel I can see some information about the computer. At the link "Advanced system settings" I can open the "System…
harper
  • 143
  • 2
  • 6
2
votes
1 answer

REMOTE_USER = SSL_CLIENT_S_DN_CN under x509 with +FakeBasicAuth in Apache. Is it possible?

Hi I'm trying to incorporate a software to our intranet services (BackupPc) This Software uses the environment variable REMOTE_USER to get the username. Placed under an Apache 2.2 server with Client certificate Authentication system and…
theist
  • 1,229
  • 2
  • 10
  • 24
2
votes
3 answers

Where is the environment variable?

I have an apache2 server with active mod-wsgi, but I can't get the environment variable PYTHON_EGG_CACHE. Here the important lines out of my virtualhost.conf: DAV svn SVNParentPath /var/svn SVNListParentPath Off WSGIProcessGroup…