I’m 100% certain that I have the correct username + password. (I tried changing the username + password and that didn’t help.) Yet when I attempt to log in, it just takes me right back to the authentication screen where it asks for my username + password. If I disable authentication entirely, I am then able to log into the File Manager. Here’s the relevant part of my Caddyfile:
nelson.pavlosky.net {
root /srv/pavlosky.net/nelson/public # the folder where Hugo generates the website
hugo /srv/pavlosky.net/nelson /admin # enable the admin panel
basicauth /admin username password
expires {
match .png$ 1y # expires png files after one year
match .jpg$ 1y # expires jpg files after one year
match .html$ 5i30s # expires html files after 5 minutes 30 seconds
match .css 1y # expires css files
}
gzip
errors {
404 404.html # Not Found
}
}
The funny thing is that this was working perfectly fine a couple months ago, but I suppose at some point I updated Caddy and/or Hugo and basicauth broke.
Caddy version: Caddy 0.10.10 (non-commercial use only)
Hugo version: Hugo Static Site Generator v0.30 linux/amd64 BuildDate: 2017-10-16T04:39:18-04:00
I don’t know how to figure out the version of the Caddy Hugo plugin?
If I disable the hugo line, I succeed in logging in. I get a 404 Page not found (because the Hugo plugin is not active), but at least I don’t get stuck in the endless loop of re-entering my username+password.
So in other words, basicauth works without the hugo plugin, and the hugo plugin works without basicauth, but the two do not work together.