> For the complete documentation index, see [llms.txt](https://docs.junyangz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.junyangz.com/ops/test-http3-docker.md).

# Test HTTP3/QUIC docker

* Nginx conf <https://github.com/cloudflare/quiche/blob/master/extras/nginx/README.md>

```apacheconf
events {
    worker_connections  1024;
}

http {
    server {
        # Enable QUIC and HTTP/3.
        listen 443 quic reuseport;

        # Enable HTTP/2 (optional).
        listen 443 ssl http2;

        ssl_certificate      cert.crt;
        ssl_certificate_key  cert.key;

        # Enable all TLS versions (TLSv1.3 is required for QUIC).
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;

        # Add Alt-Svc header to negotiate HTTP/3.
        add_header alt-svc 'h3-23=":443"; ma=86400';
    }
}
```

```bash
docker run --name test-quic -p 8180:80 -p 8143:443 --rm \
-v /var/www/html/:/usr/share/nginx/html:ro \
-v /etc/nginx/docker-nginx-conf/nginx.conf:/etc/nginx/nginx.conf \
-v /etc/nginx/docker-nginx-conf/certs/cert.crt:/etc/nginx/cert.crt \
-v /etc/nginx/docker-nginx-conf/certs/cert.key:/etc/nginx/cert.key \
ranadeeppolavarapu/nginx-http3:latest
```

* MacOS open Chrome with flag enabled

```bash
open -a /Applications/Google\ Chrome\ Canary.app --args \
--flag-switches-begin \
--enable-quic \
--quic-version=h3-23 \
--enable-features=EnableTLS13EarlyData \
--flag-switches-end
```

[docker-nginx-http3](https://github.com/RanadeepPolavarapu/docker-nginx-http3)
