I’m not sure what you mean by this. I have caddy v2 installed on Alma Linux VPS. I also have php 7.4 (including php-fpm and php-cgi) installed. I started caddy using
systemctl enable --now caddy
after setting up the Caddyfile and copying my php file into the docroot.
Job for caddy.service failed because the control process exited with error code.
See "systemctl status caddy.service" and "journalctl -xe" for details.
5. What I already tried:
I don’t know what is wrong, so not sure what to try
Next time, please be specific about the exact version of Caddy you’re running. Run the caddy version command to find out.
Essentially we’re looking to know whether you’re running Caddy as a systemd service, via a docker image, as a windows service maybe, or even just directly with caddy run or caddy start.
But your mention of systemctl makes it obvious you’re running with systemd, so
But we don’t know whether you used our official systemd service file or a different one, which is prompted by this section:
Those are called “curly braces/brackets”:
But yeah – if you have more than one site, you need them all to define a block. As the docs explain here:
Always look at Caddy’s logs in journalctl, you’ll see the exact error message that Caddy emitted. See the docs on how to use Caddy when running as a systemd service, there’s the recommended command to use to read your logs: