<업무 복습>
- Default Response header에서 Request, Response 처리 시간을 추가하기 위해서 사용
============================================================================================
Apache Module mod_headers
Summary
This module provides directives to control and modify HTTP request and response headers. Headers can be merged, replaced or removed.
Order of Processing
The directives provided by mod_headers
can occur almost anywhere within the server configuration, and can be limited in scope by enclosing them in configuration sections.
- 나는 전역설정이 아니라, 특정 포트에 적용하기 위해서 <Virtualhost> </Virtualhost> 안에 사용
results in this header being added to the response:
MyHeader: D=3775428 t=991424704447256
Header Directive
Description: | Configure HTTP response headers |
---|---|
Syntax: | Header [condition] add|append|echo|edit|edit*|merge|set|setifempty|unset|note header [[expr=]value[replacement] [early|env=[!]varname|expr=expression]] |
Context: | server config, virtual host, directory, .htaccess |
Override: | FileInfo |
Status: | Extension |
Module: | mod_headers |
Compatibility: | SetIfEmpty available in 2.4.7 and later, expr=value available in 2.4.10 and later |
This directive can replace, merge or remove HTTP response headers.
The action it performs is determined by the first argument (second argument if a condition is specified). This can be one of the following values:
add
- The response header is added to the existing set of headers, even if this header already exists. This can result in two (or more) headers having the same name. This can lead to unforeseen consequences, and in general
set
,append
ormerge
should be used instead. - - 업무 떄는 add를 사용했지만, 예상치 못한 오류를 범할 수 있기 떄문에 set, append를 추천하는구나... add보다는 저방법으로 사용하자(
append
- The response header is appended to any existing header of the same name. When a new value is merged onto an existing header it is separated from the existing header with a comma. This is the HTTP standard way of giving a header multiple values.
set
Format | Description |
---|---|
%% | The percent sign |
%t | The time the request was received in Universal Coordinated Time since the epoch (Jan. 1, 1970) measured in microseconds. The value is preceded by t= . |
%D | The time from when the request was received to the time the headers are sent on the wire. This is a measure of the duration of the request. The value is preceded by D= . The value is measured in microseconds. |
%l | The current load averages of the actual server itself. It is designed to expose the values obtained by getloadavg() and this represents the current load average, the 5 minute average, and the 15 minute average. The value is preceded by l= with each average separated by / .Available in 2.4.4 and later. |
%i | The current idle percentage of httpd (0 to 100) based on available processes and threads. The value is preceded by i= .Available in 2.4.4 and later. |
%b | The current busy percentage of httpd (0 to 100) based on available processes and threads. The value is preceded by b= .Available in 2.4.4 and later. |
%{VARNAME}e | The contents of the environment variable VARNAME . |
%{VARNAME}s | The contents of the SSL environment variable VARNAME , if mod_ssl is enabled. |
원문:
https://httpd.apache.org/docs/current/en/mod/mod_headers.html
'Server > Apache' 카테고리의 다른 글
[Apache-Tomcat] Tomcat Context.xml 구조 이해(스크랩) (0) | 2018.12.26 |
---|---|
[Apache-Jmeter] 서비스 성능테스트(스크랩) (0) | 2018.10.14 |
[Apache] Apache config 내의 ScriptAlias 지시어란? (0) | 2018.10.08 |
[Apache] VirtualHost 설정 (0) | 2018.10.07 |
[Apache] Apache log customizing하기(Apache Module mod_log_config) (0) | 2018.10.07 |