Hitachi

uCosminexus Application Server HTTP Server User Guide


B. Environment variables passed to CGI programs

Table B-1, Table B-2, and Table B-5 describe the list of environment variables that the Web server passes to the CGI programs. Table B-3 and Table B-4 describe examples of SSL_SERVER_element and SSL_SERVER_I_element. There may be cases when environment variables coded here are not set and the environment variables that are not coded here are set, depending upon the platform, client settings, request format, and directive settings of the Web server. Server names, domain names, and mail addresses mentioned in the table are false values.

Table B‒1: List of environment variables

Environment variable name

Contents

Example

AUTH_TYPE

Authentication type in the user authentication

Basic

COMSPEC

Executable file of the command prompt

C:\WINNT\system32\cmd.exe

CONTENT_LENGTH

Number of data bytes, when the request from client is POST

20

CONTENT_TYPE

Contents type, when the request from client is POST

application/x-www-form-urlencoded

DOCUMENT_ROOT

Specification value of the DocumentRoot directive

Application-Server-install-directory/httpsd/htdocs

GATEWAY_INTERFACE

CGI version

CGI/1.1

HTTP_ACCEPT

Value of the Accept header that the client displays

image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*

HTTP_ACCEPT_CHARSET

Value of the Accept-Charset header that the client displays

Shift_JIS,*,utf-8

HTTP_ACCEPT_ENCODING

Value of the Accept-Encoding header that the client displays

gzip

HTTP_ACCEPT_LANGUAGE

Value of the Accept-Language header that the client displays

ja,fr, en,it

HTTP_CONNECTION

Value of Connection header that the client displays

Keep-Alive

HTTP_HOST

Value of the Host header that the client displays

www.hws.hitachi.co.jp:8080

HTTP_PRAGMA

Value of the Pragma header that the client displays

no-cache

HTTP_REFERER

Value of the Referer header that the client displays

http://www.hws.hitachi.co.jp:8080/test.html

HTTP_USER_AGENT

Value of the User-Agent header that the client displays

Mozilla/4.73 [ja] (WinNT; U)

PATH

PATH information on Web server

C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem

PATH_INFO

The part after the CGI script in a URL

/dir1/file1

PATH_TRANSLATED

PATH_INFO value converted into the file system

Application-Server-install-directory\httpsd\htdocs\dir1\file1

QUERY_STRING

Query String sent from the client

query1=a&query2=b

REMOTE_ADDR

Client address

172.17.xx.xx

REMOTE_HOST

Host name of the client (except when the HostnameLookups is Off and the host name is resolved)

Hostxxx

REMOTE_IDENT

Client ID

Unknown

REMOTE_PORT

Port number of the client

2298

REMOTE_USER

Authenticated user name when the request is authenticated

Userxxx

REQUEST_METHOD

HTTP method sent by the client

GET

REQUEST_URI

Request URI sent by the client

/cgi-bin/test-cgi?query1=a&query2=b

SCRIPT_FILENAME

File name of the requested CGI script

Application-Server-install-directory/httpsd/cgi-bin/test-cgi

SCRIPT_NAME

The URI of the requested CGI script

/cgi-bin/test-cgi

SERVER_ADDR

The IP address of the Web server

172.17.xx.xx

SERVER_ADMIN

Specified value of the ServerAdmin directive

www-admin@server.example.com

SERVER_NAME

Host name of the Web server

www.hws.hitachi.co.jp

SERVER_PORT

The port name of the Web server

8080

SERVER_PROTOCOL

HTTP version that the client displays

HTTP/1.0

SERVER_SIGNATURE

Signature of the Web server (including the HTML tag)

<ADDRESS>Cosminexus HTTP Server 09-00 at www.example.com Port 8080</ADDRESS>

SERVER_SOFTWARE

Program name of the Web server

Cosminexus HTTP Server 09-00

SYSTEMROOT

System directory

C:\WINNT

TZ

Time zone of the Web server

JST-9

WINDIR

System directory

C:\WINNT

Table B‒2: List of environment variables for SSL communication

Environment variable name

Contents

Example

HTTPS

Displays the secure communication.

On

HTTPS_CIPHER_ALGKEYSIZE#

Number of bits of the key for the symmetric key cryptography

128

HTTPS_CIPHER_USEKEYSIZE#

Number of valid bits amongst the bits of the key for the symmetric key cryptography

128

SSL_CIPHER#

SSL encryption type (similar to the HTTPS_CIPHER)

AES128-SHA256

SSL_PROTOCOL#

SSL protocol version

TLSv1.2

SSL_SERVER_S_DN#

Distinguish Name of the subject of the SSL server certificate

/C=JP/ST=Kanagawa/L=Yokohama-shi/O=HITACHI/OU=WebSite/CN=www.hws.hitachi.co.jp/EMAIL=www-admin@hws.hitachi.co.jp

SSL_SERVER_ELEMENT

Each element of the Distinguish Name of the SSL server certificate subject

Table B-3 shows an example of when SSL_SERVER_S_DN is as shown above.

SSL_SERVER_I_DN#

Distinguish Name of the SSL server certificate issuer

/C=JP/ST=Kanagawa/L=Yokohama-shi/O=LOCAL-CA/OU=ca1/CN=ca1.hitachi.co.jp/EMAIL=ca-admin@ca1.hitachi.co.jp

SSL_SERVER_I_ELEMENT

Each request of the Distinguish Name of the SSL server certificate issuer

Table B-4 shows an example of when SSL_SERVER_I_DN is as shown above.

SSL_SESSION_ID#

SSL session ID (hexadecimal)

F968F8D7075B76587F35931DC594D3E3

SSL_SSLEAY_VERSION

OpenSSL version

OpenSSL 1.0.2j 26 Sep 2016

#

The environment variable is set if SSLOptions +StdEnvVars is specified in the configuration file.

Table B‒3: Examples of SSL_SERVER_ELEMENT

Environment variable name

Contents

Example

SSL_SERVER_CERT#2

SSL server certificate

"-----BEGIN CERTIFICATE-----\n

MIIDrTCCAxagAwIBAgIBAjANBgk...\n

-----END CERTIFICATE-----\n"

SSL_SERVER_S_DN_C#1

Country Name of the subject of the SSL server certificate (Web server)

JP

SSL_SERVER_S_DN_CN#1

Common Name of the SSL server certificate subject

www.hws.hitachi.co.jp

SSL_SERVER_S_DN_Email#1

E-Mail address of the SSL server certificate subject

www-admin@hws.hitachi.co.jp

SSL_SERVER_S_DN_L#1

Locality Name of the SSL server certificate subject

Yokohama-shi

SSL_SERVER_S_DN_O#1

Organization Name of the SSL server certificate subject

HITACHI,Ltd.

SSL_SERVER_S_DN_OU#1

Organization Unit Name of the SSL server certificate subject

WebSite

SSL_SERVER_S_DN_ST#1

State Name of the SSL server certificate subject

Kanagawa

#1

The environment variable is set if SSLOptions +StdEnvVars is specified in the configuration file.

#2

The environment variable is set if SSLOptions +ExportCertData is specified in the configuration file.

Table B‒4: Examples of SSL_SERVER_I_ELEMENT

Environment variable name

Contents

Value

SSL_SERVER_I_DN_C#

Country Name of the SSL server certificate issuer

JP

SSL_SERVER_I_DN_CN#

Common Name of the SSL server certificate issuer

ca1.hitachi.co.jp

SSL_SERVER_I_DN_Email#

E-Mail address of the SSL server certificate issuer

ca-admin@ca1.hitachi.co.jp

SSL_SERVER_I_DN_L#

Locality Name of the SSL server certificate issuer

Yokohama-shi

SSL_SERVER_I_DN_O#

Organization Name of the SSL server certificate issuer

LOCAL-CA

SSL_SERVER_I_DN_OU#

Organization Unit Name of the SSL server certificate issuer

ca1

SSL_SERVER_I_DN_ST#

State Name of the SSL server certificate issuer

Kanagawa

#

The environment variable is set if SSLOptions +StdEnvVars is specified in the configuration file.

Table B‒5: List of environment variables when authenticating the SSL client

Environment variable name

Contents

Example

SSL_CLIENT_CERT#2

SSL server certificate

"-----BEGIN CERTIFICATE-----\n

MIIDrTCCAxagAwIBAgIBAjANBgk...\n

-----END CERTIFICATE-----\n"

SSL_CLIENT_CERT_CHAIN_n#2

SSL server certificate

"-----BEGIN CERTIFICATE-----\n

MIIDrTCCAxagAwIBAgIBAjANBgk...\n

-----END CERTIFICATE-----\n"

SSL_CLIENT_S_DN#1

Distinguish Name of the SSL client certificate subject

/C=JP/ST=Kanagawa/L=Yokohama/O=Hitachi/OU=soft/CN=c_name/EMAIL=c_name@soft.hitachi.co.jp

SSL_CLIENT_Element

Each element of the Distinguish Name of the SSL client certificate subject

Table B-6 shows an example of when SSL_CLIENT_S_DN is as shown above.

SSL_CLIENT_I_DN#1

Distinguish Name of the SSL client certificate issuer

/C=JP/ST=Kanagawa/L=Yokohama-shi/O=LOCAL-CA/OU=ca1/CN=ca1.hitachi.co.jp/EMAIL=ca-admin@ca1.hitachi.co.jp

SSL_CLIENT_I_Element

Each element of the Distinguish Name of the SSL client certificate issuer

Table B-7 shows an example of when SSL_CLIENT_I_DN is as shown above.

#1

The environment variable is set if SSLOptions +StdEnvVars is specified in the configuration file.

#2

The environment variable is set if SSLOptions +ExportCertData is specified in the configuration file.

Table B‒6: Example of SSL_CLIENT_ELEMENT

Environment variable name

Contents

Example

SSL_CLIENT_S_DN_C#

Country Name of the SSL client certificate subject

Jp

SSL_CLIENT_S_DN_CN#

Common Name of the SSL client certificate subject

c_name

SSL_CLIENT_S_DN_Email#

E-Mail address of the SSL client certificate subject

c_name@soft.hitachi.co.jp

SSL_CLIENT_S_DN_L#

Locality Name of the of SSL client certificate subject

Yokohama

SSL_CLIENT_S_DN_O#

Organization Name of the SSL client certificate subject

Hitachi

SSL_CLIENT_S_DN_OU#

Organization Unit Name of the SSL client certificate subject

Soft

SSL_CLIENT_S_DN_ST#

State Name of the SSL client certificate subject

Kanagawa

#

The environment variable is set if SSLOptions +StdEnvVars is specified in the configuration file.

Table B‒7: Examples of SSL_CLIENT_I_ELEMENT

Environment variable name

Contents

Example

SSL_CLIENT_I_DN_C#

Country Name of the SSL client certificate issuer

JP

SSL_CLIENT_I_DN_CN#

Common Name of the SSL client certificate issuer

ca1.hitachi.co.jp

SSL_CLIENT_I_DN_Email#

E-Mail address of the SSL client certificate issuer

ca-admin@ca1.hitachi.co.jp

SSL_CLIENT_I_DN_L#

Locality Name of the SSL client certificate issuer

Yokohama-shi

SSL_CLIENT_I_DN_O#

Organization Name of the SSL client certificate issuer

LOCAL-CA

SSL_CLIENT_I_DN_OU#

Organization Unit Name of the SSL client certificate issuer

ca1

SSL_CLIENT_I_DN_ST#

State Name of the SSL client certificate issuer

Kanagawa

#

The environment variable is set if SSLOptions +StdEnvVars is specified in the configuration file.