Created
November 7, 2024 06:38
-
-
Save brettinternet/b92a200c385edd7957224b2d62975a74 to your computer and use it in GitHub Desktop.
Traefik routing configuration for pihole - rewrites URL to remove the /admin path
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/traefik/pihole.yaml | |
http: | |
middlewares: | |
pihole-redirectregex: | |
redirectRegex: | |
regex: /admin/$ | |
replacement: / | |
pihole-addprefix: | |
addPrefix: | |
prefix: /admin | |
routers: | |
pihole: | |
rule: Host(`pihole.{{ env "MY_DOMAIN" }}`) | |
service: pihole | |
entryPoints: [websecure] | |
middlewares: | |
- pihole-redirectregex@file | |
- pihole-addprefix@file | |
services: | |
pihole: | |
loadBalancer: | |
passHostHeader: true | |
servers: | |
- url: http://192.168.1.2/admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment