Can't log in with basicauth

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: {
   root /srv/  # the folder where Hugo generates the website
   hugo /srv/ /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
   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.

Help? :slight_smile:

What happens if you disable the line:
hugo /srv/ /admin # enable the admin panel

Is it able to log in?

What version of Caddy and http.hugo are you using?

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.

As it seems to be a filemanager issue, I would suggest opening an issue here that refers to this thread:

A contributor of this plugin (which isn’t in Caddy core) will be able to investigate the issue more thoroughly.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.