Thanks for the guide. I wanted my pihole admin interface to be reachable from both pihole.domain.local
and pihole
. The setting $HTTP["host"] == "pihole.domain.local"
doesn't allow multiple hostnames though.
My solution (after a bit of googling) was to replace that line with:
$HTTP["host"] =~ "pihole($|\.domain\.local)" {
This will use regex instead of an absolute setting (the regex just accepts pihole
OR pihole.domain.local
).
Note: this might be obvious, but make sure your cert has a SAN (Subject Alternate Name) containing the shortname as well as the FQDN. Otherwise the cert won't be trusted/valid for the shortname.
Hope this helps anyone else looking to access their admin UI via the shortname or the FQDN.