Appendix 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 nameContentsExample
AUTH_TYPEAuthentication type in the user authenticationBasic
COMSPECExecutable file of the command promptC:\WINNT\system32\cmd.exe
CONTENT_LENGTHNumber of data bytes, when the request from client is POST20
CONTENT_TYPEContents type, when the request from client is POSTapplication/x-www-form-urlencoded
DOCUMENT_ROOTSpecification value of the DocumentRoot directive<Cosminexus-install-directory>/httpsd/htdocs
GATEWAY_INTERFACECGI versionCGI/1.1
HTTP_ACCEPTValue of the Accept header that the client displaysimage/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
HTTP_ACCEPT_CHARSETValue of the Accept-Charset header that the client displaysShift_JIS,*,utf-8
HTTP_ACCEPT_ENCODINGValue of the Accept-Encoding header that the client displaysgzip
HTTP_ACCEPT_LANGUAGEValue of the Accept-Language header that the client displaysja,fr, en,it
HTTP_CONNECTIONValue of Connection header that the client displaysKeep-Alive
HTTP_HOSTValue of the Host header that the client displayswww.hws.hitachi.co.jp:8080
HTTP_PRAGMAValue of the Pragma header that the client displaysno-cache
HTTP_REFERERValue of the Referer header that the client displayshttp://www.hws.hitachi.co.jp:8080/test.html
HTTP_USER_AGENTValue of the User-Agent header that the client displaysMozilla/4.73 [ja] (WinNT; U)
PATHPATH information on Web serverC:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem
PATH_INFOThe part after the CGI script in a URL/dir1/file1
PATH_TRANSLATEDPATH_INFO value converted into the file system<Cosminexus-install-directory>\httpsd\htdocs\dir1\file1
QUERY_STRINGQuery String sent from the clientquery1=a&query2=b
REMOTE_ADDRClient address172.17.xx.xx
REMOTE_HOSTHost name of the client (except when the HostnameLookups is Off and the host name is resolved)Hostxxx
REMOTE_IDENTClient IDUnknown
REMOTE_PORTPort number of the client2298
REMOTE_USERAuthenticated user name when the request is authenticatedUserxxx
REQUEST_METHODHTTP method sent by the clientGET
REQUEST_URIRequest URI sent by the client/cgi-bin/test-cgi?query1=a&query2=b
SCRIPT_FILENAMEFile name of the requested CGI script<Cosminexus-install-directory>/httpsd/cgi-bin/test-cgi
SCRIPT_NAMEThe URI of the requested CGI script/cgi-bin/test-cgi
SERVER_ADDRThe IP address of the Web server172.17.xx.xx
SERVER_ADMINSpecified value of the ServerAdmin directivewww-admin@server.example.com
SERVER_NAMEHost name of the Web server
SERVER_PORTThe port name of the Web server8080
SERVER_PROTOCOLHTTP version that the client displaysHTTP/1.0
SERVER_SIGNATURESignature of the Web server (including the HTML tag)<ADDRESS>Cosminexus HTTP Server 09-00 at www.example.com Port 8080</ADDRESS>
SERVER_SOFTWAREProgram name of the Web serverCosminexus HTTP Server 09-00
SYSTEMROOTSystem directoryC:\WINNT
TZTime zone of the Web serverJST-9
WINDIRSystem directoryC:\WINNT

Table B-2 List of environment variables for SSL communication

Environment variable nameContentsExample
HTTPSDisplays the secure communication.On
HTTPS_CIPHERSSL encryption typeRC4-MD5
HTTPS_KEYSIZENumber of bits of the key for the symmetric key cryptography128
HTTPS_SECRETKEYSIZENumber of valid bits amongst the bits of the key for the symmetric key cryptography128
SSL_CIPHERSSL encryption type (similar to the HTTPS_CIPHER)RC4-MD5
SSL_PROTOCOL_VERSIONSSL protocol versionSSLv3
SSL_SERVER_DNDistinguish 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_ELEMENTEach element of the Distinguish Name of the SSL server certificate subjectTable B-3 shows an example of when SSL_SERVER_DN is as shown above.
SSL_SERVER_I_DNDistinguish 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_ELEMENTEach request of the Distinguish Name of the SSL server certificate issuerTable B-4 shows an example of when SSL_SERVER_I_DN is as shown above.
SSL_SESSION_IDSSL session ID (hexadecimal)F968F8D7075B76587F35931DC594D3E3
SSL_MES_VERSIONMES versionMES 3.2.2.2 27-July-2010

Table B-3 Examples of SSL_SERVER_ELEMENT

Environment variable nameContentsExample
SSL_SERVER_CCountry Name of the subject of the SSL server certificate (Web server)JP
SSL_SERVER_CNCommon Name of the SSL server certificate subjectwww.hws.hitachi.co.jp
SSL_SERVER_EMAILE-Mail address of the SSL server certificate subjectwww-admin@hws.hitachi.co.jp
SSL_SERVER_LLocality Name of the SSL server certificate subjectYokohama-shi
SSL_SERVER_OOrganization Name of the SSL server certificate subjectHITACHI,Ltd.
SSL_SERVER_OUOrganization Unit Name of the SSL server certificate subjectWebSite
SSL_SERVER_STState Name of the SSL server certificate subjectKanagawa

Table B-4 Examples of SSL_SERVER_I_ELEMENT

Environment variable nameContentsValue
SSL_SERVER_I_CCountry Name of the SSL server certificate issuerJP
SSL_SERVER_I_CNCommon Name of the SSL server certificate issuerca1.hitachi.co.jp
SSL_SERVER_I_EMAILE-Mail address of the SSL server certificate issuerca-admin@ca1.hitachi.co.jp
SSL_SERVER_I_LLocality Name of the SSL server certificate issuerYokohama-shi
SSL_SERVER_I_OOrganization Name of the SSL server certificate issuerLOCAL-CA
SSL_SERVER_I_OUOrganization Unit Name of the SSL server certificate issuerca1
SSL_SERVER_I_STState Name of the SSL server certificate issuerKanagawa

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

Environment variable nameContentsExample
SSL_CLIENT_CERTSSL client certificate (DER-BASE64 format)
The setting of the SSLExportClientCertificates directive is required.
"MIIDrTCCAxagAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBlzELMAkGA1UEBhMCSlAx..."
SSL_CLIENT_CERT_nCA certificate starting from the CA that issues the SSL client certificate up to the root CA (n is a positive integer value displaying the number of chains) (DER-BASE64 format)
The setting of the SSLExportCertChainDepth directive is required.
"MIIDrTCCAxagAwIBAgIBAjANBgkqhkiG9w0BAQQFADCBlzELMAkGA1UEBhMCSlAx..."
SSL_CLIENT_DNDistinguish 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_ElementEach element of the Distinguish Name of the SSL client certificate subjectTable B-6 shows an example of when SSL_CLIENT_DN is as shown above.
SSL_CLIENT_I_DNDistinguish 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_ElementEach element of the Distinguish Name of the SSL client certificate issuerTable B-7 shows an example of when SSL_CLIENT_I_DN is as shown above.

Table B-6 Example of SSL_CLIENT_ELEMENT

Environment variable nameContentsExample
SSL_CLIENT_CCountry Name of the SSL client certificate subjectJp
SSL_CLIENT_CNCommon Name of the SSL client certificate subjectc_name
SSL_CLIENT_EMAILE-Mail address of the SSL client certificate subjectc_name@soft.hitachi.co.jp
SSL_CLIENT_LLocality Name of the of SSL client certificate subjectYokohama
SSL_CLIENT_OOrganization Name of the SSL client certificate subjectHitachi
SSL_CLIENT_OUOrganization Unit Name of the SSL client certificate subjectSoft
SSL_CLIENT_STState Name of the SSL client certificate subjectKanagawa

Table B-7 Examples of SSL_CLIENT_I_ELEMENT

Environment variable nameContentsExample
SSL_CLIENT_I_CCountry Name of the SSL client certificate issuerJP
SSL_CLIENT_I_CNCommon Name of the SSL client certificate issuerca1.hitachi.co.jp
SSL_SERVER_I_EMAILE-Mail address of the SSL client certificate issuerca-admin@ca1.hitachi.co.jp
SSL_CLIENT_I_LLocality Name of the SSL client certificate issuerYokohama-shi
SSL_CLIENT_I_OOrganization Name of the SSL client certificate issuerLOCAL-CA
SSL_CLIENT_I_OUOrganization Unit Name of the SSL client certificate issuerca1
SSL_CLIENT_I_STState Name of the SSL client certificate issuerKanagawa