Skip to content
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

Webserver RootPATH #1784

Open
GitHubSwimmer opened this issue Mar 10, 2025 · 7 comments
Open

Webserver RootPATH #1784

GitHubSwimmer opened this issue Mar 10, 2025 · 7 comments

Comments

@GitHubSwimmer
Copy link

After updating pihole, I was sad to discover that pihole is now running amok with its paths.

In addition to the /admin/ path, it now uses countless order paths under /api/, which is quite inconvenient if other applications are running on the web server in the /api path.

Please create an adjustable path pointer.

A subdomain for pihole as an alternative would be pointless.

@PromoFaux
Copy link
Member

Pi-hole's webserver is embedded (per https://pi-hole.net/blog/2025/02/18/introducing-pi-hole-v6/) If paths are conflicting, perhaps run it on a different port.

(see /etc/pihole/pihole.toml -> webserver.ports)

However, as you've posted this in the docker repo - I'm even more confused. What does your setup look like? (We have a template for issues for a very good reason, you know 😉 )

@GitHubSwimmer
Copy link
Author

Changing the web server ports also makes no sense, since pihole runs behind an extensively configured reverse proxy and no other port may be opened to the outside

@PromoFaux
Copy link
Member

What does your docker compose look like?

@GitHubSwimmer
Copy link
Author

GitHubSwimmer commented Mar 10, 2025

services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      #- "53:53/tcp"
      - "10.0.13.4:1453:53/udp"
      - "10.0.13.4:8090:80/tcp"
    environment:
      TZ: 'Europe/Amsterdam'
      FTLCONF_webserver_api_password: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
      FTLCONF_dns_listeningMode: 'all'
    volumes:
      - './etc-pihole:/etc/pihole'
    cap_add:
      - SYS_NICE
    restart: unless-stopped

@PromoFaux
Copy link
Member

  • "10.0.13.4:8090:80/tcp"

Right, OK - so presumably host networking here and you're mapping 8090 outside the container to 80 inside it.

Can you try setting the web interface port to listen on port 8090 inside the container with env var:

FTLCONF_webserver_ports: '8090'

And then changing your ports section to suit.

@DL6ER
Copy link
Member

DL6ER commented Mar 10, 2025

Note that there is a PR currently under review allowing prefacing. Would that work for your setup? You could then host Pi-hole under, e.g., www.example.com/pihole and both /api and /admin will be inside this prefix.

Have a look over at pi-hole/FTL#2319, the referenced issue pi-hole/FTL#2298 has an exemplary docker-compose.yml showing how it could be used with traefik as reverse proxy.

@the-daame
Copy link

I have exactly the same issue in a K3s cluster with my pihole deployment's.

In the prev release i could manage the web root via env var

'VIRTUAL_HOST: <your.url.&.domain>/subpath'

Something like that var would be great in v6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants