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.

Filter by
Sorted by
Tagged with
0
votes
1answer
53 views

On CentOS 8 in profile.d do I need to add my script related to environment variables to both an .sh and .csh file?

I need to add environmental variables related to proxy servers to allow my node.js app to communicate with reCAPTCHA Enterprise on Google Cloud. When I run the scripts from Accessing Google Cloud APIs ...
0
votes
0answers
17 views

Having difficulty passing environmental variables from Docker into Nginx.conf

My nginx.conf should all be set up to add the environmental variable, see: # snippet from nginx-test.conf proxy_set_header Authorization ${CREDS}; etc etc And then my docker run command is set up as ...
0
votes
0answers
15 views

no login/no home dir user gets permission for denied (redhat8)

I am trying to solve a problem At work there is a given task where a python application is currently running on a server, this application is using a env file, which has username and password ...
0
votes
1answer
233 views

java.exe in “C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe” overridden local Java installation

Why and how come java.exe appeared in "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\java.exe", on Windows 10, and even more surprisingly - overridden my OpenJDK's java.exe binary,...
1
vote
2answers
48 views

How do I make my PHP Source installation use the libraries inside of /usr/local/programname/lib instead or /usr/local/lib?

How do I make my PHP Source installation use the libraries inside of /usr/local/programname/lib instead or /usr/local/lib? I have tried setting LD_LIBRARY_PATH to each of the program names like ...
0
votes
1answer
76 views

Setting environment variable for a different user in windows

There are tons of examples on the web how to set an environment variable for the current user. Is it possible to set an environment variable in windows for a different user (that does not have login ...
0
votes
1answer
369 views

Python throws KeyError when exporting environment variables

I have a weird case where i have a secret.env file where i set all my environment variables as such: secret.env export TWITTER_CONSUMER_KEY="something" export TWITTER_CONSUMER_SECRET="...
1
vote
2answers
241 views

Using ENV variables in Postfix and Dovecot configuration files

I'm trying to dockerize my mailing server and I'm having some troubles regarding how am I supposed to use environment variables inside Postfix and Dovecot configuration files (I'm using the latest ...
0
votes
2answers
318 views

gammu 1.42, gammu-smsd service error, LD_LIBRARY_PATH not found

I'm trying install Gammu 1.42 to serve my SMS gateway on Centos 8. make, make test, make install works fine. LD_LIBRARY_PATH configured in /etc/profile as: ...... LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/...
0
votes
1answer
98 views

NUMBER_OF_PROCESSORS env var incorrect on Dell PowerEdge Gen14 With Windows Server 2012 R2

I'm seeing that the environment variable NUMBER_OF_PROCESSORS is incorrect on my newly installed Dell PowerEdge 740xd Gen 14 running Windows Server 2012 R2 Standard. The machine contains 2 CPUs - ...
0
votes
0answers
36 views

Process getting different environment variables to system settings

I have an issue where a tomcat process started through salt stack is getting different environment variables than the ones set on the system. This is on a centos 7 server. Below is the locale -v ...
1
vote
0answers
250 views

Apache 2.4 environment variables in config

Ok, so I'm building a docker image for apache. I want to allow users to specify custom apache config with the environment variable. TL;DR The question could be simplified to this: how to use ...
1
vote
0answers
38 views

Environment variables inside of an environment file

Background I was deploying my docker environment to a production server when I've noticed that the application would not work. For some reason the environment variables were not set correctly inside ...
1
vote
1answer
197 views

Can the Apache SetEnvIf Request_URI variable be decoded in Virtual Host and/or Server config context?

When the following SetEnvIf directive is in a virtual host directory section or in an .htaccess file the Request_URI variable is percent decoded. But when it is not in a directory section or .htaccess ...
0
votes
0answers
38 views

How can I add a library search path to an executable running with a capability?

I have an application that needs to run with the CAP_NET_BIND_SERVICE capability so that it can open a low port (502 for a TCP/Modbus server). It comes bundled with a set of .so files that it needs to ...
0
votes
2answers
65 views

How to set a tmp env variable from inside a bash script

I have a simple bash script: #!/bin/bash export MONGOMS_DOWNLOAD_URL="https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.2.8.tgz" export MONGOMS_VERSION="4.2.8" ...
0
votes
0answers
32 views

How can I configure Supervisor to use a variable for command directory?

I am using supervisor to watch my laravel queue and restart on failure. I followed the instructions in laravels documentation to install and configure the service. This configuration works correctly: [...
0
votes
1answer
28 views

How do I set enviromental varialbes for my ubuntu server?

I have a ubuntu server deployed at digitalocean with gunicorn and nginx to host my django project. Now I want to save my secret key in an env. var. . I searched in the internet and I found that I have ...
0
votes
1answer
437 views

Using IfDefine with environment variables

I am trying to make my configuration as flexible and easy-to-configure as possible by using a list of variables in /etc/sysconfig and loading the environment variables when Apache is started using a ...
-1
votes
1answer
170 views

How can I fix the error Undefined variable: _ENV in /home/nginx/domains/mydomain.com/system/Config/BaseConfig.php?

I am trying to install a Codeigniter application in pure NGINX + PHP-FPM environment but it was previously developed in apache . After adding all the proper rules to Nginx in order to work with ...
0
votes
1answer
725 views

How to interpolate Jenkins environment variables inside Dockerfile?

I have a Jenkins pipeline, One of the stages of the pipeline is to build the artifact from a java application code. The artifact always get the name hello-world-${BUILD_ID}.war using BUILD_ID jenkins ...
1
vote
1answer
150 views

linux capabilities to read environment variables?

I'd like to run a service as a non-privileged user, but it needs to bind to a system port number (i.e. less than 1024), so I give it setcap 'cap_net_bind_service=+ep' <path for service>, all ...
1
vote
0answers
31 views

How to auto init direnv on Google Cloud Shell?

my .bashrc has these lines at the bottom: if [ -f $HOME/tools/bashrc ]; then source $HOME/tools/bashrc fi and $HOME/tools/bashrc has this code at the bottom: eval "$(pyenv init -)" pyenv ...
0
votes
2answers
377 views

Where to Unset or change $_SERVER['LD_LIBRARY_PATH']?

I have an Apache 2.4 proxying to PHP7.4.4 php-fpm and I am trying to hide or unset the $_SERVER['LD_LIBRARY_PATH'] variable. How do I change or get rid of this variable $_SERVER['LD_LIBRARY_PATH'] in ...
0
votes
1answer
87 views

Are /etc/profile.d scripts always executed on server boot?

I have a GCP instance with Ubuntu 18.04, and I'm using GCP secret manager to pull down secrets at boot time with a script in /etc/profile.d, that way I can setup system-wide environment variables that ...
0
votes
1answer
60 views

Where is $TERM set in Linux

Specifically Ubuntu 16.04 but is there a general way it is set? The reason I ask is that I have several Ubuntu 16.04 installations (VMs on kvm/libvirt/qemu) where nothing specific was done to set ...
1
vote
0answers
132 views

Need to Pass Environment Variables Through Apache Proxy

BACKEND: I have Tomcat connected to Apache and JKMount'ed to webapps.demo.example.com. FRONTEND: The primary VirtualHost is setup for demo.example.com. I have one application Proxy'd to BACKEND. ...
0
votes
1answer
543 views

Grafana - Config overridden from Environment variable

I'm trying to follow Configure with environment variables / root_url # grep GF_ROOT_URL docker-compose.override.yml - GF_ROOT_URL=https://g.x.com/ # yet, when I invite ...
0
votes
1answer
50 views

Environment variables within docker images

My goal is to use environment variables in the docker-compose.yml file that can be referenced inside the application itself like in config/database.yml docker-compose.yml ... environment: $DB_NAME:...
1
vote
1answer
392 views

Within FreeBSD jail – setting global environment vars

I need to set a systemwide environment variable (i.e. NODE_ENV=production) in a FreeBSD jail. I did try setting it in /etc/profile, but when I sourced it root@www:/ # source /etc/profile I got ...
0
votes
1answer
183 views

Passing environment variables to httpd in centos 7

In my previous Centos 6.10 server , I have been able to pass some environment variables to httpd by adding to /etc/sysconfig/httpd . ~/.envvars .envvars content is export MY_PASSWORD='somepassword'...
0
votes
1answer
2k views

How to make changes to environmental variables on Windows Server 2016 stick and stay permanent?

After setting the CLASSPATH environmental variable on Windows Server 2016 using the Control Panel/System/Advanced Settings/Environmental Variables UI Tool - the CLASSPATH value reverts back to its ...
0
votes
1answer
75 views

GitLab: Global (instance-level) variables for CI builds

How can I set up global environment variables in GitLab that are not project-specific, but apply to all projects? Classic use cases are deployment keys, docker registry credentials and connect proxy ...
6
votes
1answer
929 views

SSH: Behavior of SetEnv for TERM variable

I want to set the TERM environment variable to a different value for each of my remote machines, so i used SetEnv TERM=myTermForRemoteVar in ~/.ssh/config. The remote machine still sees TERM=...
0
votes
2answers
623 views

Unable to export service account key in Terraform #GCP

I have downloaded the GCP service account key to my local system. In Terraform, I have set the GOOGLE_APPLICATION_CREDENTIALS as a path to this file in the startup-script part of my bastion instance. ...
0
votes
1answer
645 views

How to set the “ASPNETCORE_ENVIRONMENT” environmentVariable in the WEBROOT (web.config) with APPCMD.exe?

How am I able to set the sites web.config "ASPNETCORE_ENVIRONMENT" environmentVariable with APPCMD.exe? So far I've tried ending it using /commit:MACHINE/WEBROOT, /commit:webroot and I get the below: ...
1
vote
0answers
122 views

Permanently load environment variable on aws ssm login in windows PowerShell

I am using ssm login for logging into my windows server 2016 data center edition. When I make a RDP connection and run PowerShell from RDP, All the system environment variables are loded correctly ...
0
votes
0answers
815 views

How to increase the Java Memory in Windows Server 2016 R2?

I am trying to follow This Link to increase the memory that is available to the Java Runtime Environment, becase I encountered the "insurfficient memory for the Java Runtime Environment to continue" ...
-1
votes
1answer
600 views

Can multiple nginx statements be on the same line in a config file?

The Problem I'm creating a docker image which dynamically creates nginx config based on environment variables. I would like to minimise the number of environment variables required. I have a config ...
1
vote
1answer
140 views

How can I make an environment variable visible to a script placed in /etc/cron.daily?

Say I have a script named "mydailyscript" containing the following: #!/bin/bash if [ ! -z $MYDAILYLOG]; then exec 1>$MYDAILYLOG fi echo This script ran on $(date) and I then copy this script to /...
2
votes
1answer
5k views

Setting Apache Tomcat JRE_HOME without setting environment variable

I have a server which uses Java 6 for an Oracle implementation. But I want to install a Tomcat Apache Server on it but with Java 8. So in order to not mix the system environment here's what I want to ...
0
votes
1answer
4k views

Pass variable in remote SSH-command in Jenkins-job

i have a little test job: touch 22.txt echo "wwe" > 22.txt test=$(echo ${BUILD_NUMBER}) echo $test ssh jenkins@srv1 "mkdir D:\myfolder\$test" ssh jenkins@srv1 "dir D:\myfolder\" BUILD_NUMBER ...
-2
votes
3answers
48 views

See someone unused environment variable [closed]

Let's say I log in as Bob to host server. Then i do : export MYSEC='secret' Let's say Alice has access to the same host and also sudo permissions. How can Alice see the value of MYSEC? Note : let'...
1
vote
1answer
27 views

Task under SYSTEM won't run Win Srv 2k8R2

My company has a software that updates our installers on clients' servers. During the setup, a environment variable is created along with a task with the following lines: Variable: setx ccloud "C:\...
0
votes
0answers
132 views

What is the best approach to storing and deploying environment variable files to Node.js if they are excluded from version control?

Firstly a tiny bit of background: I have a MEAN stack application running on Bitnami Ubuntu, on AWS. I have a .env file with API keys etc in it, that is excluded from my repo using .gitignore. I ...
-1
votes
1answer
287 views

Can't change global PATH environment in ubuntu 18.04

I tried editing /etc/environment, changed it by removing games and adding my swift installation location, so now it looks like: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/...
1
vote
1answer
2k views

Set an Environment Variable in both Apache and System

I'd like to set an environment variable in both system and httpd. I set the variable, let's say IMPORTANT_FOLDER = /MY/PATH, in /etc/profile and it works for all system users. What i want to do is ...
0
votes
1answer
2k views

Issue in setting env Variable for Supervisor debian

I am using supervisorctl for running a program and environment variables to store the common variables. For setting Environment Variable I am using /etc/environment. I have added the following as ...
0
votes
1answer
116 views

How to adjust the format of Win System Environmental variables “%date%”

I have a computer running Window Server 2008 R2 Standard. It runs several periodic tasks written by Windows cmd. Recently these batch jobs work improperly and i realize that the logic of the script ...
2
votes
0answers
3k views

Using Environment variable in proxy_pass nginx

I have nginx container where I want to forward an api call to another server. I want to pass in environment variables from Docker Compose to be able to change sites, without rebuilding the Docker ...

1
2 3 4 5
8