Lanie Molinar Carmelo<p>Hi everyone,<br><br>I'm encountering an issue with my self-hosted setup using <strong>Caddy 2.9.1</strong> and <strong>Authelia 4.38.19</strong>. All domains except <code>auth.laniecarmelo.tech</code> return a <strong>401 Unauthorized</strong> error. Journald logs suggest issues with insecure schemes (<code>''</code>) instead of <code>https</code> or <code>wss</code>.</p><p><strong>Details:</strong></p><ul><li><strong>Setup:</strong> Caddy as reverse proxy, Authelia for authentication</li><li><strong>Domains:</strong> AdGuard Home, Forgejo, LinkAce, MiniFlux, TheLounge, Homepage, Beszel, Glances, Uptime Kuma, Tandoor Recipes, BookStack, Watchtower, Portainer</li><li><strong>Logs:</strong><br>Authelia:<br><code>Feb 24 21:01:47 stormux authelia[2932]: level=error msg="Target URL '/' has an insecure scheme '', only 'https' and 'wss' are supported"</code>Caddy:<br><code>Feb 24 21:19:41 stormux caddy[48845]: {"msg":"handled request","method":"GET","host":"adguard.laniecarmelo.tech","status":200}</code></li></ul><p><strong>Configurations:</strong> </p><ul><li>Full Caddyfile and Authelia config: <a href="https://gist.github.com/Lanie-Carmelo/fce9a7d6c984fc816475afee430f54a8" rel="nofollow noopener noreferrer" target="_blank">GitHub Gist</a></li></ul><p><strong>Curl Output:</strong><br><br>HTTP Request:</p><pre><code>$ curl home.laniecarmelo.tech -v<br>< HTTP/1.1 308 Permanent Redirect<br>< Location: https://home.laniecarmelo.tech/<br></code></pre><p>HTTPS Request:</p><pre><code>$ curl https://home.laniecarmelo.tech -v<br>< HTTP/2 401 <br>< content-type: text/plain; charset=utf-8<br>< server: Caddy<br>401 Unauthorized<br></code></pre><p>Does anyone know what might be causing this? I suspect it could be related to <code>forward_auth</code> or trusted proxies.</p><p>Thanks in advance! 🙏 </p><p><a href="https://allovertheplace.ca/tags/SelfHosting" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SelfHosting</span></a> <a href="https://allovertheplace.ca/tags/CaddyServer" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CaddyServer</span></a> <a href="https://allovertheplace.ca/tags/Authelia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Authelia</span></a> <a href="https://allovertheplace.ca/tags/ReverseProxy" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ReverseProxy</span></a> <a href="https://allovertheplace.ca/tags/TechHelp" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>TechHelp</span></a> <a href="https://allovertheplace.ca/tags/Linux" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Linux</span></a> <a href="https://allovertheplace.ca/tags/HomeLab" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HomeLab</span></a><br><span class="h-card" translate="no"><a href="https://lemmy.ml/c/selfhost" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>selfhost</span></a></span> <span class="h-card" translate="no"><a href="https://a.gup.pe/u/selfhosting" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>selfhosting</span></a></span> <span class="h-card" translate="no"><a href="https://lemmy.world/c/selfhosted" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>selfhosted</span></a></span></p>