-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow custom web interface URI for Pi-hole admin #1739
Conversation
This change introduces the ability to customize the URI from which the Pi-hole admin interface is served. Previously, the webroot was hardcoded as "/admin/". Now, if the configuration variable FTLCONF_webserver_paths_webhome is defined (e.g., FTLCONF_webserver_paths_webhome=/pihole/), the interface will be served from that specified path. This update enhances flexibility for deployments that use a reverse proxy to handle HTTPS and route traffic to the correct container path. Signed-off-by: pepramon <[email protected]>
This might work in docker already, but on bare metal this won't work as we (unfortunately) have some hard-coded paths in various scripts. |
I don't think this will work in docker without other modifications. I think the |
I tested it and it works for a Docker image without problems. You can enter the container using I do not know how I do not know how |
It uses git to compare the local and remote branches. These lines won't work if the web interface is moved: Without updatechecker, the container will fail to find the current local version. |
Signed-off-by: pepramon <[email protected]>
I just added a little dirty trick: Just add a symlink to the admin directory so that other scripts can work properly. However, it is necessary to set |
I really think this should be fixed on Core as well before any release, so every installation (docker and bare metal) will allow this option. And when we change Core code, some changes made here will need to be adjusted, some will be unnecessary. |
Looks like the page is redirecting to itself ( |
Oups, I do not detect that issue, my pihole is behind a nginx proxy, and seem that happens with SSL fail. Now I see Later, when you enter (jut try to write and stops), seems that all works nice. It's only the login page. I think that better option is remove this pull request because is harder than I think. Sorry. |
Overview
This pull request adds support for a configurable web interface URI in the Pi-hole Docker container. With this update, users can specify where the Pi-hole admin interface is served by setting the environment variable FTLCONF_webserver_paths_webhome.
Motivation
In many deployment scenarios—especially those using a reverse proxy for HTTPS—it is beneficial to serve the admin interface under a custom URI. For example, by setting FTLCONF_webserver_paths_webhome=/pihole/ in your docker-compose file, the admin interface will be available at /pihole/ instead of the default /admin/.
How to Enable
To activate this feature, add the following line to your docker-compose file:
FTLCONF_webserver_paths_webhome=/pihole/
This instructs the container to serve the admin interface from the specified path.
Testing
Please test the change in your environment by defining the variable and verifying that the Pi-hole admin interface is correctly accessible from the new URI.
Conclusion
This update provides enhanced flexibility for configuring the Pi-hole Docker container, making it easier to integrate with custom routing or proxy setups.