Install:
I have a pi 4 with NGINX as server. It is also running Nextcloud(also on php7.4) and I have pihole on php7.4. Both are talking to php-fpm through sockets. I created sockets for both of these seperately.
Apart from this it is a standard pihole install.
Also I added the auth_basic because I saw this in a tutorial and thought maybe it will solve my problem. If this is not needed I would like to delete these. Now the browser ask me for a password and then right after, pi hole also wants me to sign in. I think only the pihole sign in is safe enough for home use.
Expected Behaviour:
I expect that the admin page will be able to accept settings and that I can do stuff in the admin panel.
I use:
- raspberry pi 4
- ubuntu server 20.04 LTS
- pihole is installed in /home/pihole instead of /var/www (but this should not cause the issue right?)
- everything connected with cable
- I run pihole as user pihole, and run my server as user server
- ufw firewall:
To Action From
22/tcp ALLOW IN Anywhere
80,443/tcp (Nginx Full) ALLOW IN Anywhere
22/tcp (v6) ALLOW IN Anywhere (v6)
80,443/tcp (Nginx Full (v6)) ALLOW IN Anywhere (v6)
Actual Behaviour:
The admin panel says it succesfully set the setting. But on reload nothing has changed. Also I get a php error about an offset not being set:
2021/02/16 19:33:06 [error] 5771#5771: *1 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined offset: 2 in /home/pihole/admin/scripts/pi-hole/php/update_checker.php on line 46PHP message: PHP Notice: Undefined offset: 2 in /home/pihole/admin/scripts/pi-hole/php/update_checker.php on line 47PHP message: PHP Notice: Undefined offset: 2 in /home/pihole/admin/scripts/pi-hole/php/update_checker.php on line 52PHP message: PHP Notice: Undefined offset: 2 in /home/pihole/admin/scripts/pi-hole/php/update_checker.php on line 58" while reading upstream, client: 192.168.2.200, server: _, request: "GET /admin/groups-domains.php?type=white HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm-pihole.sock:", host: "192.168.2.1", referrer: "http://192.168.2.1/admin/"
I don't know what that error is or how I can solve it, but I think that error is the problem. I believe this may be the problem.
Debug Token:
kv1xx84hdr
PS: nginx site file:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/pihole;
server_name _;
autoindex off;
index pihole/index.php index.php index.html index.htm;
location / {
expires max;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.4-fpm-pihole.sock;
fastcgi_param FQDN true;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
location /*.js {
index pihole/index.js;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
location /admin {
root /home/pihole;
index index.php index.html index.htm;
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd;
}
location ~ /\.ht {
deny all;
}
}