From: Yann Ylavic Date: Fri, 27 Jan 2023 15:30:46 +0000 (+0000) Subject: docs: Better mod_proxy_wstunnel vs mod_proxy_http upgrade= documentation. X-Git-Tag: 2.5.0-alpha2-ci-test-only~136 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4ac608497b01ad5dcfad2f8f1457115098b3339;p=thirdparty%2Fapache%2Fhttpd.git docs: Better mod_proxy_wstunnel vs mod_proxy_http upgrade= documentation. [skip ci] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1907031 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml index b0a329c9a74..cf0653cd95a 100644 --- a/docs/manual/mod/mod_proxy.xml +++ b/docs/manual/mod/mod_proxy.xml @@ -1275,10 +1275,13 @@ ProxyPass "/example" "http://backend.example.com" max=20 ttl=120 retry=300

Value of secret used by mod_proxy_ajp. See the documentation of this module for more details.

- upgrade + upgrade WebSocket -

Protocol accepted in the Upgrade header by mod_proxy_wstunnel. - See the documentation of this module for more details.

+

Protocol accepted by mod_proxy_http or + mod_proxy_wstunnel for the HTTP Upgrade mechanism + upon negotiation by the HTTP client/browser (per + RFC 9110 - Upgrade). + See the Protocol Upgrade note below

mapping - @@ -1500,6 +1503,29 @@ RewriteRule ^/mirror/foo/(.*) %{ENV:protocol}://backend.example.com/$1 [P] ProxyPassReverse "/mirror/foo/" "http://backend.example.com/" ProxyPassReverse "/mirror/foo/" "https://backend.example.com/" + + <a id="protoupgrade" name="protoupgrade">Protocol Upgrade</a> +

Since Apache HTTP Server 2.4.47, protocol Upgrade (tunneling) can be handled + end-to-end by mod_proxy_http using the ProxyPass + parameter upgrade.

+

End-to-end means that the HTTP Upgrade request from the client/browser is first + forwarded by mod_proxy_http to the origin server and the connection + will be upgraded (and tunneled by mod_proxy_http) only if the origin + server accepts/initiates the upgrade (HTTP response 101 Switching Protocols). + If the origin server responds with anything else mod_proxy_http + will continue forwarding (and enforcing) the HTTP protocol as usual for this + connection.

+ Example + +ProxyPass "/some/http/or/ws/path/" "http://example.com/some/http/or/ws/path/" upgrade=websocket + + +

For Apache HTTP Server 2.4.46 and earlier (or if + ProxyWebsocketFallbackToProxyHttp + from 2.4.48 and later disables mod_proxy_http handling), see the + documentation of mod_proxy_wstunnel for how to proxy the WebSocket + protocol.

+