Permissions for 'admin' folder for external domain

Recently I've had to reinstall my Ubuntu router and pihole. Everything is working fine, except for one thing that worked before and now doesn't.

In my lighttpd.conf I run a couple of websites with external domains, e.g.

$HTTP["host"]  == "mydomain.com" {
        server.document-root = "/var/www/html/mydomainfolder"
}

$HTTP["host"]  == "mysub.mydomain.com" {
        server.document-root = "/var/www/html/mysubdomainfolder"
}

etc.

This works fine, and I can also access the pihole administration website locally. Before, I had this working fine too:

$HTTP["host"]  == "pihole.mydomain.com" {
        server.document-root = "/var/www/html/admin"
}

But now when I navigate to pihole.mydomain.com I get 403 Forbidden. I've spent a few days trying to work this out, and I have read a number of posts and FAQs on this forum but without success. Can anybody please give me a couple of pointers to what I'm missing?

Possibly related, automatic redirection has been removed in January 2023, see Pi-hole FTL v5.20.1, Web v5.18.1 and Core v5.15 released.

1 Like

Perfect, thank you. I'd tried the url.redirect = ("" => "/admin/") line but it hadn't worked from lighttpd.conf. Moving the call to a *.conf file under the conf-enabled directory did the trick. Thanks again.

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