Apache HTTP Server Version 2.4

Apache > HTTP Server > Documentation > Version 2.4 > Modules

# Apache Module mod_proxy_http2

Available Languages: en

Description: | HTTP/2 support module for `mod_proxy`
Status: | Extension
Module Identifier: | proxy_http2_module
Source File: | mod_proxy_http2.c

### Summary

This module requires the service of `mod_proxy`. It provides the features used for proxying HTTP/2 requests. `mod_proxy_http2` supports HTTP/2 only. It does not provide any downgrades to HTTP/1.1.

Thus, in order to get the ability of handling HTTP/2 proxy requests, `mod_proxy` and `mod_proxy_http2` have to be present in the server.

`mod_proxy_http2` works with incoming requests over HTTP/1.1 and HTTP/2 requests. If `mod_http2` handles the frontend connection, requests against the same HTTP/2 backend are sent over a single connection, whenever possible.

This module relies on libnghttp2 to provide the core http/2 engine.

### Warning

This module is experimental. Its behaviors, directives, and defaults are subject to more change from release to release relative to other standard modules. Users are encouraged to consult the "CHANGES" file for potential updates.

### Warning

Do not enable proxying until you have secured your server. Open proxy servers are dangerous both to your network and to the Internet at large.

### Topics

- Basic Examples
- Request notes

### Directives

This module provides no directives.

### Bugfix checklist

- httpd changelog
- Known issues
- Report a bug

### See also

- `mod_http2`
- `mod_proxy`
- `mod_proxy_connect`
- Comments

## Basic Examples

The examples below demonstrate how to configure HTTP/2 for backend connections for a reverse proxy.

### HTTP/2 (TLS)

    ProxyPass "/app" "h2://app.example.com"
    ProxyPassReverse "/app" "h2://app.example.com"

### HTTP/2 (cleartext)

    ProxyPass "/app" "h2c://app.example.com"
    ProxyPassReverse "/app" "h2c://app.example.com"

## Request notes

`mod_proxy_http` creates the following request notes for logging using the `%{VARNAME}n` format in `LogFormat` or `ErrorLogFormat`:

proxy-source-port
  The local port used for the connection to the backend server.
proxy-status
  The HTTP/2 status received from the backend server.

Available Languages: en

## Comments

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our mailing lists.