Thanks for the heads up! Yes indeed it did change something, I just need one reverse proxy statement now.
As I read in Implement auto-redirection to /admin - #2 by DL6ER to set webserver.domain
to the domain I'm using (pi-hole.home
in my example) even the redirect to /admin
works, so I can skip this in nginx config too.
New config:
server {
listen 192.168.0.1:80;
listen [::]:80 ;
server_name pi-hole.home;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:8001/;
}
}
server {
# redirect non-standard TLD to proper domain
listen 192.168.0.1:80;
listen [::]:80 ;
server_name pi.hole;
location / {
return 301 $scheme://pi-hole.home/admin/;
}
}