# Apache module mod_env

This module provides for passing environment variables to CGI/SSI scripts.

Status: Base
Source File: mod_env.c
Module Identifier: env_module
Compatibility: Available in Apache 1.1 and later.

## Summary

This module allows Apache's CGI and SSI environment to inherit environment variables from the shell which invoked the httpd process. CERN web-servers are able to do this, so this module is especially useful to web-admins who wish to migrate from CERN to Apache without rewriting all their scripts

## Directives

- PassEnv
- SetEnv
- UnsetEnv

## PassEnv directive

Syntax: PassEnv variable variable ...
Context: server config, virtual host
Status: Base
Module: mod_env
Compatibility: PassEnv is only available in Apache 1.1 and later.

Specifies one or more environment variables to pass to CGI scripts from the server's own environment. Example:

        PassEnv LD_LIBRARY_PATH

## SetEnv directive

Syntax: SetEnv variable value
Context: server config, virtual host
Status: Base
Module: mod_env
Compatibility: SetEnv is only available in Apache 1.1 and later.

Sets an environment variable, which is then passed on to CGI scripts. Example:

        SetEnv SPECIAL_PATH /foo/bin

## UnsetEnv directive

Syntax: UnsetEnv variable variable ...
Context: server config, virtual host
Status: Base
Module: mod_env
Compatibility: UnsetEnv is only available in Apache 1.1 and later.

Removes one or more environment variables from those passed on to CGI scripts. Example:

        UnsetEnv LD_LIBRARY_PATH