Module mod_env

Module mod_env supports directives for the IBM® HTTP Server for i Web server.

Summary

This module allows the HTTP Server CGI and SSI environment to inherit environment variables.

Directives

PassEnv

Module: mod_env
Syntax: PassEnv variable [variable ...]
Default: none
Context: server config, virtual host, directory, .htaccess
Override: none
Origin: Apache
Example: PassEnv LD_LIBRARY_PATH

The PassEnv directive specifies one or more environment variables to pass to the CGI scripts. The variables originate from the server's own environment. See Environment variables set by HTTP Server for more information.

Parameter: variable
  • The variable parameter is any valid environment variable.

SetEnv

Module: mod_env
Syntax: SetEnv variable [value]
Default: none
Context: server config, virtual host, directory, .htaccess
Override: FileInfo
Origin: Apache
Examples:
  • SetEnv SPECIAL_PATH /QIBM/bin
  • SetEnv QIBM_CGI_LIBRARY_LIST "MIME;CGIURL;CGILIBL"

The SetEnv directive allows you to set an internal environment variable that is passed on to CGI scripts and SSI pages.

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 RewriteRule directive, you should instead set the environment variable with SetEnvIf.

UnsetEnv

Module: mod_env
Syntax: UnsetEnv variable [variable ...]
Default: none
Context: server config, virtual host, directory, .htaccess
Override: none
Origin: Apache
Example: UnsetEnv LD_LIBRARY_PATH

The UnsetEnv directive removes one or more environment variables from those passed on to CGI scripts. See Environment variables set by HTTP Server for more information.

Parameter: variable
  • The variable parameter is any valid environment variable.