Search
Varnish Enterprise

Introduction Installation Upgrading Troubleshooting Changelog Changelog for 6.0.x Changes (Varnish Cache 4.1) Changes (Varnish Cache Plus 4.1) Known Issues Features Backend SSL/TLS Client SSL/TLS termination Cluster In-Process TLS MSE 4 Basic Configuration / Getting Started Configuration Persisted caching Categories Configuration Reference MSE 3.0 Settings mkfs.mse Memory Governor MSE 2.0 NUMA Parallel ESI Backend health counter HTTP/2 Support JSON Logging TCP Only Probes Timeouts Transit Buffer Varnish scoreboard VMODs Accept Accounting ACL (aclplus) ActiveDNS Akamai Connector AWS VCL Body Access & Transformation (xbody) Brotli Cookie Plus (cookieplus) DeviceAtlas DeviceAtlas3 Digest Dynamic backends (goto) Edgestash File Format Geolocation (geoip/mmdb) Header Manipulation (headerplus) HTTP communication (http) Image JSON parsing (json) JWT Key value storage (kvstore) Least connections director (leastconn) Module to control the built-in HTTP2 transport (h2) MSE control (mse) MSE4 control (mse4) Probe Proxy ProxyV2 TLV Attribute Extraction (proxy) Pseudo Random Number Generator Purge (purge/softpurge) Real-time Status (rtstatus) Reverse DNS (resolver) Rewrite S3 VMOD Session Slicer SQLite3 Stale Standard (std) Stat (Prometheus) Strings (str) Synthetic backends (synthbackend) Tag-based invalidation (Ykey/Xkey) TCP configuration (tcp) TLS Total Encryption (crypto) Unified director object (udo) Uniform Resource Identifier (uri) Unix Socket Utilities (unix) URL Plus (urlplus) Utils Vsthrottle

HTTP/2 Support

To enable HTTP/2, you need to configure both hitch and Varnish.

Enable HTTP/2 in Hitch

Enable HTTP/2 in hitch by turning it on in the hitch configuration file.

# Enable to let clients negotiate HTTP/2 with ALPN. (default off)
alpn-protos = "h2, http/1.1"

Enable HTTP/2 in Varnish

Enable HTTP/2 in Varnish by passing -p feature=+http2 as a startup argument to Varnish in the varnishd command line.

Do this by updating the unit file’s Execstart= as the unit file configuration tutorial describes.

Below is an example of having adding -p feature=+http2 to the varnishd defaults:

[Service]
ExecStart=/usr/sbin/varnishd -p feature=+http2 ...

If varnish is already running you can enable HTTP/2 on the CLI with varnishadm. Note this varnishadm method of enabling HTTP/2 will not survive a restart.

$ varnishadm param.set feature +http2

Show the Varnish HTTP/2 status

Check if HTTP/2 is enabled in Varnish by running on the CLI:

$ varnishadm param.show feature

®Varnish Software, Wallingatan 12, 111 60 Stockholm, Organization nr. 556805-6203