Question: Apache and Environmental Settings (Linux)

Discussion in 'Apache' started by shevegen, Jan 28, 2006.

  1. #1
    Hi,
    my apache runs as a specific user. This user has access to only his home dir,
    and apache specific stuff like log files.

    Now, I would like to have this user know certain environmental settings (Variables)

    For example:

    export MY_APACHE_HOME="/usr/local/apache2"

    This is just one example.

    I would like to have this, so that I can access this variable from within a script.
    (Another example, in a Ruby script you can access to this variable by doing something such as
    puts ENV['MY_APACHE_HOME']

    I am using some variables for ALL user accounts, these variables are mostly just there
    to simplify something. Nothing really important, but it makes things nicer to do stuff such as
    cd $MY_APACHE_HOME
    (again, this is just another example)


    Does anyone know where exactly I have to put those settings so that the apache user can use them, and so that certain scripts (like ruby scripts) can access to this variables?

    I tried to put them in the apache user /home/ dir inside .bashrc, but this doesnt seem to make any difference. (If it should, I probably made an error).
     
    shevegen, Jan 28, 2006 IP