<-
Apache > HTTP Server > Documentation > Modules

Apache Module mod_proxy_http2 5l6d5i

Available Languages:  fr 

Description: HTTP/2 module for mod_proxy
Status: Extension
Module Identifier: proxy_http2_module
Source File: mod_proxy_http2.c
Compatibility: Available in httpd 2.4.19 and later

Summary 6m2os

mod_proxy_http2 s HTTP/2 only, it does not provide any downgrades to HTTP/1.1. This means that the backend needs to HTTP/2 because HTTP/1.1 will not be used instead.

This module requires the service of mod_proxy_http2 need to be both loaded by the server.

mod_proxy_http2 works with incoming fronted requests using HTTP/1.1 or HTTP/2. In both cases, requests proxied to the same backend are sent over a single T connection whenever possible (namely when the connection can be re-used).

Caveat: there will be no attempt to consolidate multiple HTTP/1.1 frontend requests (configured to be proxied to the same backend) into HTTP/2 streams belonging to the same HTTP/2 request. Each HTTP/1.1 frontend request will be proxied to the backend using a separate HTTP/2 request (trying to re-use the same T connection if possible).

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

Warning 6h505h

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

Warning 6h505h

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.

 Apache!

Topics 2c136y

Directives 1a4l6m

This module provides no directives.

Bugfix checklist 4i2533

See also 27136x

top

Basic Examples 5w4i6x

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

HTTP/2 (TLS) 4cx1j

Proxy "/app" "h2://app.example.com"
ProxyReverse "/app" "https://app.example.com"

HTTP/2 (cleartext) 3r3x4t

Proxy "/app" "h2c://app.example.com"
ProxyReverse "/app" "http://app.example.com"

The schemes to configure above in ProxyReverse for reverse proxying h2 (or h2c) protocols are the usual https (resp. http) as expected/used by the agent.

top

Request notes d6s2b

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:  fr 

top

Comments 2p1l6j

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 by our s 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 Libera.chat, or sent to our mailing lists.