Redirect to login.html is incorrect when using a reverse proxy

Author: sstallionCreated Jan 2, 2024Updated Sep 17, 2026
LabelscompatibilitydocumentationPriority: P4

Prerequisites

Platform (OS and CPU architecture)

FreeBSD, AMD64 (aka x86_64)

Installation

Custom package (OpenWrt, HomeAssistant, etc; please mention in the description)

Setup

On one machine

AdGuard Home version

0.107.36

Action

When using AdGuard Home behind a reverse proxy (Apache 2.4 in this case), unauthenticated users are redirected to /login.html, which causes issues when placed behind a subdirectory. The naive fix for this would be a relative redirect (eg. login.html.

My Apache configuration (which should be equivalent to the documented nginx configuration) is:

ProxyPreserveHost On
ProxyPass /adguard/ http://localhost:3000/
ProxyPassReverse /adguard/ http://localhost:3000/
ProxyPassReverseCookiePath /adguard/ /

Thanks in advance!

Expected result

Redirects work when using a reverse proxy from a subdirectory (eg. /adguard/login.html).

Actual result

An absolute redirect to /login.html is performed.

Additional information and/or screenshots

FreeBSD 13.2-RELEASE-p9; installed using the www/adguardhome port.