The issue I am facing:
I'm having issues with a nginx reverse proxy to the docker image pihole/pihole:latest.
I have a home "control panel" where I have several systems in in reverse proxies and a bunch of stuff where the pi-hole admin GUI is one.
When I log in to the pi-hole admin panel I get logged out of my session in nginx.
After I log in to the control panel again, I'm logged in to both pi-hole and control panel.
Details about my system:
nginx version: nginx/1.18.0 (Ubuntu)
nginx module: auth_request
docker image pihole/pihole:latest
The control panel lives in the location /home/ and the pi-hole reverse proxy lives in /home/pihole/
nginx conf:
location ^~ /home/ {
auth_request /auth;
location ~ ^(?!\/home\/pihole\/).*\.php$ {
include fastcgi.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
location /home/pihole/ {
add_header Content-Security-Policy "default-src 'self'; font-src *;img-src * data:; script-src 'self' 'unsafe-inline' *; style-src 'self' 'unsafe-inline' *; frame-ancestors *";
proxy_redirect /admin/ /home/pihole/;
proxy_pass http://127.0.0.1:8008/admin/;
proxy_set_header X-Frame-Options "SAMEORIGIN";
}
---other conf omitted---
}
What I have changed since installing Pi-hole:
The docker image is standard :latest and port 53 and 8080 are routed to the docker image.