I tried to follow https://github.com/mholt/caddy/wiki/Plugging-in-Plugins-Yourself by modifying the end of the imports in caddymain/run.go to be:
"github.com/mholt/caddy/caddytls" // This is where other plugins get plugged in (imported) _ "github.com/hacdias/filemanager" _ "github.com/miekg/caddy-prometheus" )
I performed a
go get for each of those plugin github URLs. Then, while still within src/github.com/mholt/caddy/caddy I ran
go run build.go to create the caddy binary. Next I ran
caddy -plugins and didn’t see either of the two plugins listed. Running the caddy binary works fine without directives for the plugins, using the prometheus directive results in the following message:
no action found for directive ‘prometheus’ with server type ‘http’ (missing a plugin?)
Perhaps that wiki page is out of date?