User Guide

http.expvar

expvar exposes variables about the runtime or current process state in JSON format. The default endpoint is /debug/vars. By default, it reports memory statistics, the command used to run Caddy, and the number of goroutines.

This is a debugging tool. Although it is usually safe to use this on live sites, take care that you do not reveal anything sensitive. Also note that plugins may add to the list of values that are published.

For more information, please see Go's expvar documentation.

Syntax

expvar [path]

Examples

Enable expvar at the default path:

expvar

Enable expvar at a custom path:

expvar /stats

Need help with this feature?

Join us in the Caddy forum, where the open source community gathers to share their knowledge.

Does your company use Caddy?

Purchase a commercial license to use Caddy with your business and for basic email support, along with other benefits!