Pointed 01-parking-proxy.onecalls.in to cuddy server IP.
Added CNAME to indhya.com → 01-parking-proxy.onecalls.in
Getting http: TLS handshake error from 103.240.233.XXX:19134: no certificate available for 'indhya.com'
4. Error messages and/or full log output:
http: TLS handshake error from 103.240.233.XXX:19134: no certificate available for 'indhya.com'
Remove all these lines. They aren’t useful, and in some situations harmful. Caddy sets the appropriate proxy headers automatically.
There must be more logs than that. Caddy will have attempted to issue a certificate for that domain. Please post all your logs, not just that one line.
root@ubuntu-1cpu-1gb-sg-sin1:/etc/caddy# caddy start
2021/06/24 16:11:10.370 INFO using adjacent Caddyfile
2021/06/24 16:11:10.371 WARN input is not formatted with 'caddy fmt' {"adapter": "caddyfile", "file": "Caddyfile", "line": 2}
2021/06/24 16:11:10.373 INFO admin admin endpoint started {"address": "tcp/localhost:2019", "enforce_origin": false, "origins": ["localhost:2019", "[::1]:2019", "127.0.0.1:2019"]}
2021/06/24 16:11:10.373 INFO http server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}
2021/06/24 16:11:10.373 INFO http enabling automatic HTTP->HTTPS redirects {"server_name": "srv0"}
2021/06/24 16:11:10.374 DEBUG http starting server loop {"address": "[::]:443", "http3": false, "tls": true}
2021/06/24 16:11:10.374 DEBUG http starting server loop {"address": "[::]:80", "http3": false, "tls": false}
2021/06/24 16:11:10.374 INFO http enabling automatic TLS certificate management {"domains": ["01-parking-proxy.onecalls.in"]}
2021/06/24 16:11:10.374 INFO autosaved config (load with --resume flag) {"file": "/root/.config/caddy/autosave.json"}
2021/06/24 16:11:10.374 INFO serving initial configuration
2021/06/24 16:11:10.375 INFO tls.cache.maintenance started background certificate maintenance {"cache": "0xc0005f0fc0"}
2021/06/24 16:11:10.375 INFO tls cleaning storage unit {"description": "FileStorage:/root/.local/share/caddy"}
2021/06/24 16:11:10.375 INFO tls finished cleaning storage units
Successfully started Caddy (pid=34249) - Caddy is running in the background
root@ubuntu-1cpu-1gb-sg-sin1:/etc/caddy# 2021/06/24 16:11:15.667 DEBUG http.stdlib http: TLS handshake error from 103.240.233.131:18823: no certificate available for 'indhya.com'
2021/06/24 16:11:15.844 DEBUG http.stdlib http: TLS handshake error from 103.240.233.131:18826: no certificate available for 'indhya.com'
2021/06/24 16:11:15.871 DEBUG http.stdlib http: TLS handshake error from 103.240.233.131:18827: no certificate available for 'indhya.com'
2021/06/24 16:11:16.048 DEBUG http.stdlib http: TLS handshake error from 103.240.233.131:18829: no certificate available for 'indhya.com'
Also, I strongly recommend running Caddy as a systemd service rather than using caddy start for reliability.
If you installed Caddy with the apt repo we provide, then that’s set up automatically. If you installed Caddy manually, then you can follow these instructions:
Using the caddy start command runs Caddy as a different user than with the systemd service, which means it won’t use the same storage, so it would fetch new TLS certificates. Don’t do that.
To see your logs, run this command:
journalctl -u caddy --no-pager | less
To see the latest logs, hit Shift+G to jump to the bottom, arrow keys/pgup/pgdn to navigate. Q to exit.