Skip to content

Commit 21aa26a

Browse files
committed
Update Pi-hole subfolder config to support Pi-hole v6
1 parent d1fc8c3 commit 21aa26a

File tree

2 files changed

+10
-33
lines changed

2 files changed

+10
-33
lines changed

pihole.subdomain.conf.sample

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Version 2024/07/16
1+
## Version 2025/04/29
22
# make sure that your pihole container is named pihole
33
# make sure that your dns has a cname set for pihole
44

@@ -45,20 +45,7 @@ server {
4545
proxy_hide_header X-Frame-Options;
4646
}
4747

48-
location /admin {
49-
# enable the next two lines for http auth
50-
#auth_basic "Restricted";
51-
#auth_basic_user_file /config/nginx/.htpasswd;
52-
53-
# enable for ldap auth (requires ldap-server.conf in the server block)
54-
#include /config/nginx/ldap-location.conf;
55-
56-
# enable for Authelia (requires authelia-server.conf in the server block)
57-
#include /config/nginx/authelia-location.conf;
58-
59-
# enable for Authentik (requires authentik-server.conf in the server block)
60-
#include /config/nginx/authentik-location.conf;
61-
48+
location /api {
6249
include /config/nginx/proxy.conf;
6350
include /config/nginx/resolver.conf;
6451
set $upstream_app pihole;

pihole.subfolder.conf.sample

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
## Version 2023/02/05
1+
## Version 2025/04/29
22
# make sure that your pihole container is named pihole
3-
# pihole does not require a base url setting
3+
# make sure that pihole is set to work with the base url /pihole
4+
5+
# in pihole settings, under Webserver and API, set "webserver.paths.prefix" to "/pihole",
6+
# or run `[docker container exec pihole] pihole-FTL --config webserver.paths.prefix /pihole`
47

58
location /pihole {
69
return 301 $scheme://$host/pihole/;
@@ -31,24 +34,11 @@ location ^~ /pihole/ {
3134
proxy_hide_header X-Frame-Options;
3235
}
3336

34-
location /pihole/admin {
35-
return 301 $scheme://$host/pihole/admin/;
37+
location /pihole/api {
38+
return 301 $scheme://$host/pihole/api/;
3639
}
3740

38-
location ^~ /pihole/admin/ {
39-
# enable the next two lines for http auth
40-
#auth_basic "Restricted";
41-
#auth_basic_user_file /config/nginx/.htpasswd;
42-
43-
# enable for ldap auth (requires ldap-server.conf in the server block)
44-
#include /config/nginx/ldap-location.conf;
45-
46-
# enable for Authelia (requires authelia-server.conf in the server block)
47-
#include /config/nginx/authelia-location.conf;
48-
49-
# enable for Authentik (requires authentik-server.conf in the server block)
50-
#include /config/nginx/authentik-location.conf;
51-
41+
location ^~ /pihole/api/ {
5242
include /config/nginx/proxy.conf;
5343
include /config/nginx/resolver.conf;
5444
set $upstream_app pihole;

0 commit comments

Comments
 (0)