Summary
Essentially, don't hardcode the paths to the admin interface (i.e. /var/www/html/admin
) within the codebase, and instead resort to some sort of user variable (perhaps in setupVars.conf
?)
Rationale
I wish to run multiple services on my Pi (or server, does not matter) and use nginx to reverse proxy the requested location to the correct port.
Moving the Pi-Hole web interface is, as it stands, not trivial and requires few tweaks inside the codebase, namely:
- Moving the
/var/www/html/admin
directory to my intended location (this was OK for me) - Replacing every occurance of
/var/www/html/admin
with my desired path within/opt/pihole
.
Especially the last point was rather time-consuming, even with decent scripting / CLI knowledge.
For reference, /opt/pihole
is populated with scripts from the advanced/Scripts
directory on GitHub.
Performing such modification is not trivial for average users, which definitely also run their own Pi-Hole, and may wish to add more services easily, etc. etc.. I believe this point is quite clear.
For my specific case, I also wish to run my own admin interface to manage those services, and do some other administrative tasks on, you guessed it, myhost/admin
.
Notwithstanding the above, this myhost/admin
URL also poses a security issue (well, that depends, but you get my point), as the first point of attack is always some sort of /admin
location. Even though my Pi is well-secured behind several security measures, this still irks me.
Personally, I believe running Pi-Hole is a great entrypoint to the world of networking, and users tend to add more and more services on their homeserver. Quickly they'll learn about software like nginx, lighttpd, caddy, etc., how to properly service those via exactly that software. Implementing such a feature will make exactly this process easier.
I did my best to search for possible duplicates, but I found nothing similar enough. If this is still a duplicate, I apologise in advance.