I'm trying to redirect the admin / directory to /admin to get rid of that annoying screen you see currently.
I found this on a 4 year old post
To redirect the root address to /admin, add the following line to /etc/lighttpd/lighttpd.conf:
url.redirect = ("^/$" => "/admin" )
But, it isn't that simple with docker. I created and cd'd into etc-lighttpd folder then did
docker cp pihole:/etc/lighttpd .
and got
external.conf
lighttpd
lighttpd.conf
lighttpd.conf.orig
Trying to remap lighttpd.conf didn't turn out so well
In volumes
./etc-lighttpd/lighttpd.conf:/etc/lighttpd/lighttp.conf
then
docker-compose up -d && docker-compose logs -f
Not good
pihole | mv: cannot move '/etc/lighttpd/lighttpd.conf' to '/etc/lighttpd/lighttpd.conf.orig': Device or resource busy
pihole | [cont-init.d] 20-start.sh: exited 1.
What if I map the whole directory to etc-lighttpd ?
pihole | grep: /etc/lighttpd/conf-enabled/15-fastcgi-php.conf: No such file or directory
pihole | sed: can't read /etc/lighttpd/conf-enabled/15-fastcgi-php.conf: No such file or directory
pihole | [cont-init.d] 20-start.sh: exited 2.
It looks like I'm digging myself in pretty deep. The image I'm using is "pihole/pihole:latest
"
Without having to fork pihole and build my own docker container, is there an easier way to redirect "/" to "/admin" ?
Edit: Reading through lighttpd.conf , I noticed the include statement for external.conf.
I edited the file with the / redirect line and then mapped the file
- './etc-lighttpd/external.conf:/etc/lighttpd/external.conf'
So far so good. It redirects / to /admin and pihole is still blocking ads. WIN!