As a systemd service installed following Caddy documentation
a. System environment:
Canonical-Ubuntu-22.04-2022.08.10-0
b. Command:
jason@srv:~$ systemctl status caddy
● caddy.service - Caddy
Loaded: loaded (/lib/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2022-11-08 18:04:36 UTC; 2h 38min ago
Docs: https://caddyserver.com/docs/
Process: 4157 ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile --force (code=exited>
Main PID: 3749 (caddy)
Tasks: 8 (limit: 9451)
Memory: 8.8M
CPU: 503ms
CGroup: /system.slice/caddy.service
└─3749 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile```
c. Service/unit/compose file:
d. My complete Caddy config:
cld.private.com
root * /var/www/html
file_server
3. The problem I’m having:
I’d like to use Caddy instead of Apache or Nginx to serve up Zabbix, I saw another post in Caddy forums that is resolved but the user didn’t post the resulting Caddyfile
Looks like Zabbix is a PHP application. You’ll need to use php_fastcgi probably.
You should probably follow nginx installation instructions, then just swap in Caddy where they have you install nginx.
You’ll need to have php-fpm set up to run the PHP code I think, which should be covered by nginx installation instructions.
I don’t know whether they use a standard index.php routing setup, but it should just work if they do with the usual pattern of PHP configs in Caddy: Common Caddyfile Patterns — Caddy Documentation