Am am on the development branch which introduced support for reverse proxys.
This is not working for me.
I am using Raspian 12 on RPI 5.
Settings:
nginx:
# Sub-directory of the root containing the web interface
#
# Possible values are:
# <valid subpath>, both slashes are needed!
webhome = "/admin/"
# Prefix where the web interface is served
# This is useful when you are using a reverse proxy serving the web interface, e.g.,
# at http://<ip>/pihole/admin/ instead of http://<ip>/admin/. In this example, the
# prefix would be "/pihole". Note that the prefix has to be stripped away by the
# reverse proxy, e.g., for traefik:
# - traefik.http.routers.pihole.rule=PathPrefix(`/pihole`)
# - traefik.http.middlewares.piholehttp.stripprefix.prefixes=/pihole
# The prefix should start with a slash. If you don't use a prefix, leave this field
# empty. Setting this field to an incorrect value may result in the web interface not
# being accessible.
# Don't use this setting if you are not using a reverse proxy!
#
# Possible values are:
# valid URL prefix or empty
prefix = "/pihole" ### CHANGED, default = ""
These posts are using /admin/ and /api/, I am trying to use prefix multiplexing to place it at /pihole/admin/ instead. Support for this was introduced with FTL#2319 and the corresponding web PR. This PR was opened a month and merged a few days ago. There isnt a recent post on here depicting this. This PR also introduced the config option for prefix (like seen in my pihole.toml)
As it has been merged to the development branch, that means it is not officially supported yet, and it can be expected to be changed, to break or become otherwise inoperational.
Right at the start, the PR you've linked mentions a self-contained docker compose script for testing a Traefik rev proxy with Pi-hole - perhaps perusing that compose file would give you some thoughts how to adopt that for your nginx.
I moved this into the beta category for now.
I am not familiar with docker and dont have it installed.
On my Pi i dont think it would even work that well with my very sensitive network configuration.
I am still open to provide additional information and help for a bare metal install with nginx.
I got very confused here just now trying a bunch of different stuff while forgetting what i was actually doing. My real problem was just forgetting the trailing slash /.
Updated conf:
Correct output should either be "http://pi.hole:8080/api/" since thats the port of pihole-FTL itself.(no reverse proxy here)
or something like "https//pi.hole:443/pihole/api/", but pihole doesnt know the port of the reverse proxy.
I would prefer the second solution since i plan on binding FTL to 127.0.0.1:8080 for it to only be localhost and let nginx manage the https instead