1. Caddy version (2.4.6
):
2. How I run Caddy:
Not sure how to answer this.
I have just installed it from scratch on Ubuntu 18.04 following the guidelines from here ;
https://www.digitalocean.com/community/tutorials/how-to-host-a-website-with-caddy-on-ubuntu-18-04
I have also gone through this ;
https://caddyserver.com/docs/automatic-https
So I assume it just runs ?
a. System environment:
Ubuntu 18.04
b. Command:
sudo systemctl status caddy
Tried caddy start
c. Service/unit/compose file:
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddyfile or JSON config:
Paste config here, replacing this text.
Use `caddy fmt` to make it readable.
DO NOT REDACT anything except credentials.
LEAVE DOMAIN NAMES INTACT.
Make sure the backticks stay on their own lines.
http:// {
root * /var/www
encode gzip
file_server
}
3. The problem I’m having:
Just trying to get caddy running and to confirm it is running/working
4. Error messages and/or full log output:
root@vps-24424336:~# sudo systemctl status caddy
● caddy.service - Caddy
Loaded: loaded (/etc/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2022-03-23 13:40:47 AEST; 31min ago
Docs: Welcome — Caddy Documentation
Process: 16084 ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile (code=exited, status=1
Main PID: 16084 (code=exited, status=1/FAILURE)
Mar 23 13:40:47 vps-24424336 caddy[16084]: {“level”:“info”,“ts”:1648006847.1479735,“logger”:“admin”,“msg”:"a
Mar 23 13:40:47 vps-24424336 caddy[16084]: {“level”:“info”,“ts”:1648006847.1484873,“logger”:“http”,“msg”:"se
Mar 23 13:40:47 vps-24424336 caddy[16084]: {“level”:“info”,“ts”:1648006847.1495445,“logger”:“tls”,“msg”:"cle
Mar 23 13:40:47 vps-24424336 caddy[16084]: {“level”:“info”,“ts”:1648006847.1498525,“logger”:“tls”,“msg”:"fin
Mar 23 13:40:47 vps-24424336 caddy[16084]: {“level”:“info”,“ts”:1648006847.150231,“logger”:"tls.cache.mainte
Mar 23 13:40:47 vps-24424336 caddy[16084]: {“level”:“info”,“ts”:1648006847.1504307,“logger”:"tls.cache.maint
Mar 23 13:40:47 vps-24424336 caddy[16084]: run: loading initial config: loading new config: http app module:
Mar 23 13:40:47 vps-24424336 systemd[1]: Started Caddy.
Mar 23 13:40:47 vps-24424336 systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Mar 23 13:40:47 vps-24424336 systemd[1]: caddy.service: Failed with result ‘exit-code’.
5. What I already tried:
I am not an Ubuntu type person, I am Windows, (although I have been in deep end IT for 44 years) so I am stumbling through Ubuntu as best and as intelligently as I can.
Tried a heap of Googling, reinstalled Caddy, made sure everything is as the instructions have dictated. Not sure what else to try.
6. Links to relevant resources:
https://www.digitalocean.com/community/tutorials/how-to-host-a-website-with-caddy-on-ubuntu-18-04
I have also gone through this ;
https://caddyserver.com/docs/automatic-https