p3lim
(p3lim)
September 13, 2016, 7:28am
1
If I enable the errors directive as such:
errors {
log stdout
}
I get the following error:
Activating privacy features…YYYY/MM/DD HH:MM:SS [INFO][errors] acme: Obtaining bundled SAN certificate
YYYY/MM/DD HH:MM:SS [errors] failed to get certificate: acme: Error 400 - urn:acme:error:malformed - DNS name does not have enough labels
If I try to add a custom 404 page as described in the docs I get this:
YYYY/MM/DD HH:MM:SS /etc/caddy/Caddyfile:17 - Parse error: Unknown directive ‘404’
Not sure what’s wrong here.
matt
(Matt Holt)
September 13, 2016, 4:19pm
2
What’s your entire Caddyfile?
p3lim
(p3lim)
September 13, 2016, 6:36pm
3
errors {
log stdout
404 404.html
}
p3lim.net {
tls redacted@email.tld
proxy / https://p3lim.github.io {
transparent
}
}
*.p3lim.net:80 {
tls off
redir https://p3lim.net{uri}
}
It’s the first block that’s giving me errors, running Caddy 0.9.1 on Ubuntu Server 16.04 x64.
It’s running as a service, entirely mirrored the guidelines found here:
https://github.com/mholt/caddy/tree/master/dist/init/linux-systemd
matt
(Matt Holt)
September 13, 2016, 7:23pm
4
Ah.
The Caddyfile always starts with the address of the site to serve.
—First line of Caddyfile syntax documentation
Hope that helps!
p3lim
(p3lim)
September 13, 2016, 8:32pm
5
Edit: scratch that, moved the errors block to the bottom of the Caddyfile, still getting the same errors.
matt
(Matt Holt)
September 13, 2016, 10:35pm
6
Make sure that your Caddyfile is structured properly. Caddy is expecting a site name where you have a directive.
p3lim
(p3lim)
September 14, 2016, 9:08am
7
/facepalm
I’m just so used to nginx where you can have global settings for multiple servers.
1 Like
system
(system)
Closed
December 13, 2016, 9:08am
8
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.