Reverse proxy (Pound) login ending up in 404 not found

I’ve set up a reverse proxy on my router (DD-WRT and Pound) and configured a few subdomains that all works perfectly - except Home-Assistant. When the first login screen shows up everything seems fine, but after creating an admin account and trying to login there seems to be a redirect which fails and ends up with a page stating “404 - not found”.

I’ve been playing around with most parameters in [http] such as base_url, server_port, server_host, cors_allowed_origins, use_x_forwarded_for, trusted_proxies and trusted_networks but nothing seems to work and Home-Assistant doesn’t log anything :confused:

I haven’t enabled SSL yet since I want to start out without too much complexity.

This is my pound.cfg on DD-WRT (and as stated test.domain.com, test.domain.com, lorem.domain.com and ipsum.domain.com works perfect):

TimeOut  120
Alive  30
Control  "/tmp/pound.ctl"

ListenHTTP
Address 0.0.0.0
  Port 8080
  xHTTP 3

  Service "DD-WRT"
    HeadRequire "^Host:[\t ]*DD-WRT$"
    Backend
      Address 192.168.1.1
      Port 80
    end
  end

  Service "ha.domain.com"
    HeadRequire "^Host:[\t ]*ha\.domain\.com$"
    Backend
      Address 192.168.1.3
      Port 8123
    end
  end

  Service "test.domain.com"
    HeadRequire "^Host:[\t ]*test\.domain\.com$"
    BackEnd
      Address 192.168.1.3
      Port 8888
    end
  end

  Service "lorem.domain.com"
    HeadRequire "^Host:[\t ]*lorem\.domain\.com$"
    Backend
      Address 192.168.1.3
      Port 8080
    end
  end

  Service "ipsum.domain.com"
    HeadRequire "^Host:[\t ]*ipsum\.domain\.com$"
    Backend
      Address 192.168.1.3
      Port 443
    end
  end

Did you find a solution to this? I use pound as well but am having the same problem.

I am using pound as a reverse proxy with Home Assistant and it works perfectly.

## global options:
User		"nobody"
Group		"nobody"
RootJail	"/var/jail/pound/"

LogLevel	0
LogFacility deamon
IgnoreCase	1

## check backend every 15 secs:
Alive		15

## HTTP Listener
ListenHTTP
	Address 127.0.0.1
	Port    7080 #port forward this as port 80 from the internet to 127.0.0.1
	LogLevel 0
	xHTTP 2
	HeadRemove "X-Forwarded-For"
End

## HTTPS Listener
ListenHTTPS
	Address 127.0.0.1
	Port    7443 #port forward this as port 443 from the internet to 127.0.0.1
	Cert    "/var/jail/pound/mycert.all.pem"
	LogLevel 0
	xHTTP 2
	Disable SSLv3
	Ciphers "ALL:!RC4:!ECDH:!DH"
	HeadRemove "X-Forwarded-For"
End

## Backends to both HTTP and HTTPS
Service
	HeadRequire "Host: myhomeassistant.mydomain.com"
	BackEnd
		Address 192.168.1.2 # the IP address of Home Assistant
		Port    8123
	End
End

Also in Home Assistant I set this in configuration.yaml to make it aware that the user is logging on from an external network (important if you use trusted_networks combined with trusted_users):

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 192.168.1.1 #the IP address of the router running pound seen from the inside network (as seen from Home Assistant)