> For the complete documentation index, see [llms.txt](https://pinpoint-apm.gitbook.io/pinpoint/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pinpoint-apm.gitbook.io/pinpoint/v2.4.0/documents/proxy-http-header.md).

# Monitoring Proxy Server

## Proxy monitoring using HTTP headers <a href="#proxy-monitoring-using-http-headers" id="proxy-monitoring-using-http-headers"></a>

It is used to know the elapsed time between proxy and WAS.

![overview](/files/-Mgi_GHzfI-HdZypJACn)

## Pinpoint Configuration

pinpoint.config

```
profiler.proxy.http.header.enable=true
```

## Proxy Configuration

### Apache HTTP Server

* <http://httpd.apache.org/docs/2.4/en/mod/mod_headers.html>

Add HTTP header.

```
Pinpoint-ProxyApache: t=991424704447256 D=3775428 i=51 b=49
```

e.g.

httpd.conf

```
<IfModule mod_jk.c>
...
RequestHeader set Pinpoint-ProxyApache "%t %D %i %b"
...
</IfModule>
```

**%t is required value.**

### Nginx

* <http://nginx.org/en/docs/http/ngx_http_core_module.html>
* <http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header>

Add HTTP header.

```
Pinpoint-ProxyNginx: t=1504248328.423 D=0.123
```

e.g.

nginx.conf

```
...
  server {
        listen       9080;
        server_name  localhost;

        location / {
            ...
            set $pinpoint_proxy_header "t=$msec D=$request_time";
            proxy_set_header Pinpoint-ProxyNginx $pinpoint_proxy_header;
        }
  }
...
```

or

```
http {
...

    proxy_set_header Pinpoint-ProxyNginx t=$msec;

...
}
```

**t=$msec is required value.**

### App

Milliseconds since epoch (13 digits) and app information.

Add HTTP header.

```
Pinpoint-ProxyApp: t=1594316309407 app=foo-bar
```

**t=epoch is required value.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pinpoint-apm.gitbook.io/pinpoint/v2.4.0/documents/proxy-http-header.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
