1. The problem I’m having:
I am trying to do a performance comparison on the frontend for http1.1 vs http2 vs http3 server. I was able to get http1.1 and http2 server working locally using docker fairly easily, however getting http3 to work has been a tedious task. The ymuski/curl-http
docker image has shown the response to be http3, but I want to test this on any browser only (Tested on chrome/edge - latest versions) - https://protocol.rahulmakhija.in
I have even taken the trouble of setting this up on a remote linode server, but getting the same results.
2. Error messages and/or full log output:
My Caddyfile
{
debug
servers {
protocols h1 h2 h2c h3
}
}
protocol.rahulmakhija.in {
tls rahul@example.com
root * /usr/share/caddy/html
file_server browse
header Custom-Header "My value"
log {
output file /var/log/caddy/access.log
}
}
My docker-compose.yaml
http-caddy3:
image: caddy:2.8.4
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
volumes:
- ./caddy/http3/Caddyfile:/etc/caddy/Caddyfile
- ./src:/usr/share/caddy/html
Dockerfile
# Use the official Caddy image from Docker Hub
FROM caddy:2.8.4
# Copy static assets to Nginx
COPY src/img /usr/share/caddy/html/img
COPY src/index.html /usr/share/caddy/html/
# Copy your Caddyfile to the container
COPY Caddyfile /etc/caddy/Caddyfile
# Expose the port Caddy will run on
EXPOSE 80
EXPOSE 443
# Start Caddy
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]
3. Caddy version:
2.8.4
4. How I installed and ran Caddy:
docker
docker compose up --force-rebuild
Tried referring to other threads here, but nothing helped. Starting a thread as I want this working on browser only for performance benchmarking reasons.