1. Caddy version:
v2.6.2
2. How I installed, and run Caddy:
installed with homebrew
a. System environment:
mac os ventura 13.2 (22D49)
Firefox 109
Chrome 109
b. Command:
caddy run --watch
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddy config:
localhost:4443 {
handle * {
root * /Users/chris/Sites
php_fastcgi 127.0.0.1:9000
file_server browse
encode zstd gzip
header x-powered-by "caddy local proxy"
}
encode {
gzip 4
minimum_length 256
match {
header Content-Type text/*
header Content-Type application/json*
header Content-Type application/javascript*
header Content-Type application/xhtml+xml*
header Content-Type application/atom+xml*
header Content-Type application/rss+xml*
header Content-Type image/svg+xml*
header Content-Type application/ld+json*
header Content-Type application/manifest+json*
header Content-Type application/vnd.geo+json*
header Content-Type application/vnd.ms-fontobject*
header Content-Type application/x-font-ttf*
header Content-Type application/x-web-app-manifest+json*
header Content-Type application/xml*
header Content-Type font/opentype*
header Content-Type image/bmp*
header Content-Type image/x-icon*
header Content-Type text/cache-manifest*
}
}
tls internal
}
3. The problem I’m having:
https://localhost:4443/index.html
I can not get caddy to serve http/3.
Response header is http/2 with alt-svc: h3 but the browser does not switch to http/3.
Nor on reload, or clean cache.
HTTP/2 200 OK
alt-svc: h3=“:443”; ma=2592000
content-encoding: gzip
content-type: text/html; charset=UTF-8
server: Caddy
vary: Accept-Encoding
vary: Accept-Encoding
x-powered-by: caddy local proxy
x-powered-by: PHP/8.2.1
date: Sun, 29 Jan 2023 21:31:59 GMT
X-Firefox-Spdy: h2
4. Error messages and/or full log output:
2023/01/30 13:32:28.374 INFO using adjacent Caddyfile
2023/01/30 13:32:28.375 WARN Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies {"adapter": "caddyfile", "file": "Caddyfile", "line": 37}
2023/01/30 13:32:28.377 INFO admin admin endpoint started {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
2023/01/30 13:32:28.377 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc0002553b0"}
2023/01/30 13:32:28.383 INFO http enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}
2023/01/30 13:32:28.394 INFO pki.ca.local root certificate is already trusted by system {"path": "storage:pki/authorities/local/root.crt"}
2023/01/30 13:32:28.395 INFO tls cleaning storage unit {"description": "FileStorage:/Users/chris/Library/Application Support/Caddy"}
2023/01/30 13:32:28.395 INFO http enabling HTTP/3 listener {"addr": ":4443"}
2023/01/30 13:32:28.395 INFO http.log server running {"name": "srv0", "protocols": ["h1", "h2", "h3"]}
2023/01/30 13:32:28.395 INFO http.log server running {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}
2023/01/30 13:32:28.395 INFO http enabling automatic TLS certificate management {"domains": ["localhost"]}
2023/01/30 13:32:28.396 INFO tls finished cleaning storage units
2023/01/30 13:32:28.397 WARN tls stapling OCSP {"error": "no OCSP stapling for [localhost]: no OCSP server specified in certificate", "identifiers": ["localhost"]}
2023/01/30 13:32:28.397 INFO autosaved config (load with --resume flag) {"file": "/Users/chris/Library/Application Support/Caddy/autosave.json"}
2023/01/30 13:32:28.397 INFO serving initial configuration
2023/01/30 13:32:28.397 INFO watcher watching config file for changes {"config_file": "Caddyfile"}
5. What I already tried:
I tried differnt ports 443, 9443, 4443.
Disabled apache.
Tried with different tls parameters, such das “internal” and also providing selfcreated certification files (pem/key).
Also tried with experimental_http3 option in config file - which resulted in invalid option error.
Same with “protocol h2 h3” option.
6. Links to relevant resources:
Checked postings in caddy forum.
Thank you for your help.
Chris