If you want to change the default Pi-Hole url from pihole-ip\admin to pi-hole-ip\custom, here's what you do:
- Copy the Pi-Hole directory to your custom path: cp -rp /var/www/html/admin /var/www/html/custom.
- Edit the following file: /etc/lighttpd/conf-enabled/15-pihole-admin.conf and change all six occurrences of admin into custom.
- Restart lighttpd: systemctl restart lighttpd.service
Now you should be able to access Pi-Hole with your custom url, http://pi-hole-ip/custom
If everything works, you may delete /var/www/html/admin.
Have you considered what upgrading the Pi-hole software does to your hack?
$ cat /etc/lighttpd/conf-enabled/15-pihole-admin.conf
[..]
###############################################################################
# FILE AUTOMATICALLY OVERWRITTEN BY PI-HOLE INSTALL/UPDATE PROCEDURE. #
# ANY CHANGES MADE TO THIS FILE AFTER INSTALL WILL BE LOST ON THE NEXT UPDATE #
###############################################################################
Also your hack wont work anymore once Pi-hole versions 6 is released where the lighttpd dependency is dropped in favor of one thats embedded in the pihole-FTL binary:
$ pihole-FTL --config webserver.paths.webhome
/admin/
1 Like
Well, until version 6 arrives, these scripts in /opt/pihole/ need to be modified:
piholeDebug.sh (1 instance)
uninstall.sh (1 instance)
updatecheck.sh (3 instances)
and update.sh (1 instance).
Also, I hope version 6 will add a username option to the pihole.
What @deHakkelaar pointed out is true for version 5, and version 6. In version 5, should an update be released, the changes you made will be gone.
Changing the scripts for version 6, or any version for that matter, will likely lead to issues, and will also be overwritten once any updates are applied.
This may work for you, but I feel it is a bad approach, and not something most users should consider. But hey, do what you want.
1 Like