Url running a command?

Basically what i want, is that if i go to a specific url, like example.com/url/webhook/command, make caddy run something like echo $(date) > /opt/visits

You could write a script with the functionality you want, then use the CGI plugin to call the script from a certain endpoint. The idea is to provide dynamic content for the site, but the script can do anything you could do with a normal script - Caddy just takes the standard output and returns it to the connecting client.

https://caddyserver.com/docs/http.cgi

That’s similar to the websocket directive: https://caddyserver.com/docs/websocket

Although you’d need a Websocket client.

Alright, thanks for the information,