Repository: caddyserver/caddy (language: go)

Issue:
`acme_server` stopped working in 2.7.5 (provisioner not found)
After updating to caddy 2.7.5, `acme_server` stopped working, the request for the directory endpoint always returns a 404 error.

minimal, reproducible example Caddyfile:
```Caddyfile
localhost
acme_server
```

Request from caddy 2.7.5 (tested from github releases, caddyserver.com and archlinux package):
```
% curlie https://localhost/acme/local/directory  
HTTP/2 404 
alt-svc: h3=":443"; ma=2592000
content-type: application/json
server: Caddy
content-length: 85
date: Mon, 23 Oct 2023 16:25:44 GMT

{
    "type": "notFound",
    "detail": "resource not found",
    "message": "provisioner  not found"
}
```

The problem also happens if a CA is specified for acme_server.

Before: response from caddy 2.7.4 (from github releases):

```
% curlie https://localhost/acme/local/directory  
HTTP/2 200 
alt-svc: h3=":443"; ma=2592000
content-type: application/json
server: Caddy
content-length: 272
date: Mon, 23 Oct 2023 16:25:56 GMT

{
    "newNonce": "https://localhost/acme/local/new-nonce",
    "newAccount": "https://localhost/acme/local/new-account",
    "newOrder": "https://localhost/acme/local/new-order",
    "revokeCert": "https://localhost/acme/local/revoke-cert",
    "keyChange": "https://localhost/acme/local/key-change"
}
```



Discussion / hints:
Hm, surprising.

@maraino -- I did upgrade smallstep/certificates from v0.24.3-rc.5 to v0.25.0. Do you know if that'd be the cause? I assumed -rc.5 was for the 0.25 release, but in hindsight, maybe it was just for the 24.3 release. and 0.25 had a bigger breaking change?
@mholt The biggest change was the migration to chi/v5, so I think this is the culprit:
https://github.com/caddyserver/caddy/blob/d6f86cccf5fa5b4eb30141da390cf2439746c5da/modules/caddypki/acmeserver/acmeserver.go#L29

Just append `/v5` there.
With the fix:
```
➜  caddy git:(master) ✗ curl -s https://localhost:8443/acme/local/directory | jq
{
  "newNonce": "https://localhost:8443/acme/local/new-nonce",
  "newAccount": "https://localhost:8443/acme/local/new-account",
  "newOrder": "https://localhost:8443/acme/local/new-order",
  "revokeCert": "https://localhost:8443/acme/local/revoke-cert",
  "keyChange": "https://localhost:8443/acme/local/key-change"
}
```
Oh, perfect! Thanks @maraino. Do you want to make a PR or should we?

Fix patch:
diff --git a/go.mod b/go.mod
index 5b8a229518c..a0adc7f94ac 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@ require (
 	github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b
 	github.com/caddyserver/certmagic v0.19.2
 	github.com/dustin/go-humanize v1.0.1
-	github.com/go-chi/chi v4.1.2+incompatible
+	github.com/go-chi/chi/v5 v5.0.10
 	github.com/google/cel-go v0.15.1
 	github.com/google/uuid v1.3.1
 	github.com/klauspost/compress v1.17.0
@@ -49,7 +49,6 @@ require (
 	github.com/antlr/antlr4/runtime/Go/antlr/v4 v4.0.0-20230305170008-8188dc5388df // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
 	github.com/fxamacker/cbor/v2 v2.5.0 // indirect
-	github.com/go-chi/chi/v5 v5.0.10 // indirect
 	github.com/golang/glog v1.1.2 // indirect
 	github.com/google/certificate-transparency-go v1.1.6 // indirect
 	github.com/google/go-tpm v0.9.0 // indirect
diff --git a/go.sum b/go.sum
index f154fabfa36..ba8072e4dbd 100644
--- a/go.sum
+++ b/go.sum
@@ -139,8 +139,6 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
 github.com/fxamacker/cbor/v2 v2.5.0 h1:oHsG0V/Q6E/wqTS2O1Cozzsy69nqCiguo5Q1a1ADivE=
 github.com/fxamacker/cbor/v2 v2.5.0/go.mod h1:TA1xS00nchWmaBnEIxPSE5oHLuJBAVvqrtAnWBwBCVo=
 github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
-github.com/go-chi/chi v4.1.2+incompatible h1:fGFk2Gmi/YKXk0OmGfBh0WgmN3XB8lVnEyNz34tQRec=
-github.com/go-chi/chi v4.1.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
 github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
 github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
 github.com/go-kit/kit v0.4.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
diff --git a/modules/caddypki/acmeserver/acmeserver.go b/modules/caddypki/acmeserver/acmeserver.go
index 86896150c4a..8ac1b6c892e 100644
--- a/modules/caddypki/acmeserver/acmeserver.go
+++ b/modules/caddypki/acmeserver/acmeserver.go
@@ -26,7 +26,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/go-chi/chi"
+	"github.com/go-chi/chi/v5"
 	"github.com/smallstep/certificates/acme"
 	"github.com/smallstep/certificates/acme/api"
 	acmeNoSQL "github.com/smallstep/certificates/acme/db/nosql"


Test patch: