Hitachi

Hitachi Application Server V10 Definition Reference Guide (For UNIX® Systems)


2.3.55 Header

Header customizes the response header when responding to the status code of the 200 series.

Description

Header customizes the response header when responding to the status code of the 200 series. When using this as a reverse proxy, the response header is customized regardless of the value of the status code returned from the backend web server.

Note that the mod_headers module needs to be implemented to customize the response header.

LoadModule headers_module modules/mod_headers.so

Syntax

Header{{set|append|add}header header_value[env=[!]environment_variable]|unset header}

Specifiable values

set

Set the header. If the header already exists, it will be replaced with the specified header value.

append

Add the header value to the existing header. A comma is placed to separate the headers. A header is set when no header exists.

add

Set the header to a new line even if the header exists. Use this value to set the same header in multiple lines.

unset

When a specified header exists, delete the entire header.

env=environment_variable

Execute the content specified in the Header directive when the specified environment variable is set.

env=!environment_variable

Execute the content specified in the Header directive when the specified environment variable is not set.

header_value

A character string composed of characters only, a character string composed of a format directive, or a character string composed of both can be specified.

The header value must be enclosed in double quotation marks (") when the header value contains a space.

The format directives are as follows:

Format directive

Meaning

%t

Displays the time when the request was received, from the amount of time that has elapsed since midnight on January 1st, 1970 (GMT: Greenwich Mean Time). The units are in microseconds. t= is attached at the beginning.

%D

Displays the time taken for processing the request. The units are in microseconds. D= is attached at the beginning

%{env_name}e

Displays the value for the environment variable set in env_name.

Locations where it can be written

httpsd.conf, <VirtualHost>, <Directory>, and .htaccess

Overwrite permission

FileInfo level

Example

Header set Cache-Control no-cache