Help with HTTP/3

I know from the docs that HTTP/3 support in Caddy 2 is experimental and not guaranteed to work. But since Apple added support in Safari 14 on macOS Big Sur and iOS 14, I wanted to try it on my blog and could not make it work. I guess my configuration is not correct, since it’s not working in Firefox or Chrome either.

Here’s my full Caddyfile :

{
	email nicolinux@gmail.com
	experimental_http3
}

www.voiretmanger.fr,
blog.voiretmanger.fr,
nicolasfurno.fr,
www.nicolasfurno.fr,
blog.nicolasfurno.fr,
nicolinux.fr,
blog.nicolinux.fr,
www.nicolinux.fr,
nicoflo.fr,
www.nicoflo.fr {
	redir https://voiretmanger.fr{uri}/
}

(static) {
	@static {
		file
		path *.ico *.css *.js *.gif *.jpg *.jpeg *.png *.svg *.woff *.json
	}
	header @static Cache-Control max-age=5184000
}

(security) {
	header {
		# enable HSTS
		Strict-Transport-Security max-age=31536000;
		# disable clients from sniffing the media type
		X-Content-Type-Options nosniff
		# keep referrer data off of HTTP connections
		Referrer-Policy no-referrer-when-downgrade
	}
}


voiretmanger.fr {
	root * /var/www/voiretmanger.fr
	encode zstd gzip
	file_server
	import static
	import security
	log {
		output file /var/log/caddy/voiretmanger.fr.access.log
	}

	# Redirect personnels
	redir /a-propos/publicite /soutien
	redir /archives/carte-des-restaurants /a-manger

	@cache {
		not header_regexp Cookie "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in"
		not path_regexp "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(index)?.xml|[a-z0-9-]+-sitemap([0-9]+)?.xml)"
		not method POST
		not expression {query} != ''
    }

    route @cache {
        try_files /wp-content/cache/cache-enabler/{host}{uri}/index.html {path} {path}/index.php?{query}
    }
    php_fastcgi unix//run/php/php7.4-fpm-caddy.sock
}

dev.voiretmanger.fr {
	root * /var/www/dev.voiretmanger.fr/public
	encode zstd gzip
	file_server
	import static
	import security
	log {
		output file /var/log/caddy/dev.voiretmanger.fr.access.log
	}
    php_fastcgi unix//run/php/php7.4-fpm-caddy.sock
}


dev2.voiretmanger.fr {
	root * /var/www/dev2.voiretmanger.fr
	encode zstd gzip
	file_server
	import static
	import security
	log {
		output file /var/log/caddy/dev2.voiretmanger.fr.access.log
	}
    php_fastcgi unix//run/php/php7.4-fpm-caddy.sock
}

files.voiretmanger.fr {
	root * /var/www/files.voiretmanger.fr
	encode zstd gzip
	file_server browse
	log {
		output file /var/log/caddy/files.voiretmanger.fr.access.log
	}
	import static
	import security
}

memoire.nicolasfurno.fr {
	root * /var/www/memoire.nicolasfurno.fr
	encode zstd gzip
	file_server
	log {
		output file /var/log/caddy/memoire.nicolasfurno.fr.access.log
	}
	import static
	import security
}

I’m using Caddy v2.0.0 h1:pQSaIJGFluFvu8KDGDODV8u4/QRED/OPyIR+MWYYse8= installed with the official Ubuntu package, on Ubuntu 20.04.

Let me know if you need logs to debug this, but as far as I can tell, there is no error inside. They just confirm I’m using only HTTP/2 protocole right now. I also tried checking on this website, and it also say it does not work.

Thanks ! :slight_smile:

HTTP/3 works in Caddy. Which draft of HTTP/3 does Safari support? It has to be the same draft that Caddy is serving.

Draft 27 it seems : https://twitter.com/bagder/status/1275351446268129280

But even if Safari is not compatible, what about Chrome and Firefox ? Of course, I activated the option for every browser.

Safari seems a bit behind. The latest versions of Caddy serve draft-29. I’m not sure which drafts Chrome and Firefox support; probably depends on which versions you’re using.

OK for Safari, it makes sense.

I tried using latest stable versions of Firefox and Chrome, and also the latest Chrome Canary version. But I have never seen the HTTP/3 being used on my blog.

Do you have a way to check if it should work on the server side ?

You could give this a shot, it’ll try to connect to your server with curl + http3

1 Like

It seems fine according to this website (and using the same version than Safari, apparently) :

So, i suppose it’s a browser issue ? Is there some tip I’m not aware of ?

If somebody with a working http/3 browser could try my website, just to confirm it’s working, it would be great. :slightly_smiling_face: https://voiretmanger.fr

I updated to Caddy 2.1 this morning, and nothing changed for me. My website is recognised as compatible with H3-29, but still noting in Safari, Firefox or Chrome Canary.

Is there something I’m missing somewhere ?