Hi I’ve been using Caddy v1 since its inception. I’d like to start using Caddy v2 and I’m getting stuck with fixing my Caddyfile.
- What is the equivalent of the
index
?
I’d like to convert this v1 Caddyfile to v2:
server.com {
root /data
index default.txt
}
I tried
server.com {
root * /data
file_server * {
index default.txt
}
}
but it complains.
- What is the equivalent of
except
?
I’d like to convert this v1 Caddyfile to v2:
server.com {
root /www/hostyoself
proxy / 127.0.0.1:8010 {
except /static
}
}
to v2. I can’t seem to find any info about exceptions. Also, would I use the file_server
to do this instead of just using root
?
-
Is there an equivalent of
timeouts
? I.e. I’d like to turn them off for some sites. -
What is the equivalent of
basicauth
?
I’d like to convert this v1 Caddyfile to v2:
server.com {
proxy / 127.0.0.1:8002
basicauth /secure user plainpassword
}
- What is the equivalent of
errors
?
I’d like to convert this v1 Caddyfile to v2:
server.com {
root /www/data
errors {
404 404.html
}
}
- What is the equivalent of
redir
?
I’d like to convert this v1 Caddyfile to v2:
server.com {
root /www/data
redir {
/2015/04/18 /software/ 302
/movies/ https://othersite 302
}
}