<-
Apache > HTTP Server > Documentation > Modules

Apache Module mod_env 204d1x

Available Languages:  tr 

Description: Modifies the environment which is ed to CGI scripts and SSI pages
Status: Base
Module Identifier: env_module
Source File: mod_env.c

Summary 6m2os

This module allows for control of internal environment variables that are used by various Apache HTTP Server modules. These variables are also provided to CGI scripts as native system environment variables, and available for use in SSI pages. Environment variables may be ed from the shell which invoked the httpd process. Alternatively, environment variables may be set or unset within the configuration process.

 Apache!

Directives 1a4l6m

Bugfix checklist 4i2533

See also 27136x

top

Env Directive 2y627

Description: es environment variables from the shell
Syntax: Env env-variable [env-variable] ...
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Base
Module: mod_env

Specifies one or more native system environment variables to make available as internal environment variables, which are available to Apache HTTP Server modules as well as propagated to CGI scripts and SSI pages. Values come from the native OS environment of the shell which invoked the httpd process.

Example 5z1g6h

Env LD_LIBRARY_PATH
top

SetEnv Directive 11542o

Description: Sets environment variables
Syntax: SetEnv env-variable [value]
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Base
Module: mod_env

Sets an internal environment variable, which is then available to Apache HTTP Server modules, and ed on to CGI scripts and SSI pages.

Example 5z1g6h

SetEnv SPECIAL_PATH /foo/bin

If you omit the value argument, the variable is set to an empty string.

The internal environment variables set by this directive are set after most early request processing directives are run, such as access control and URI-to-filename mapping. If the environment variable you're setting is meant as input into this early phase of processing such as the SetEnvIf.

See also 27136x

top

UnsetEnv Directive 1a7017

Description: Removes variables from the environment
Syntax: UnsetEnv env-variable [env-variable] ...
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Status: Base
Module: mod_env

Removes one or more internal environment variables from those ed on to CGI scripts and SSI pages.

Example 5z1g6h

UnsetEnv LD_LIBRARY_PATH

Available Languages:  tr 

top

Comments 2p1l6j

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our s if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our mailing lists.