Hello,
I am trying to run Pi-hole under Apache. I have already worked through the suggestions here, but am still experiencing issues with the web GUI.
I am running Pi-hole v5.2.4 on CentOS 8.3, with Apache v2.4 and PHP v7.2.
Mostly, it appears to be working, but if I attempt to make any changes via the web GUI, nothing gets committed, and the OS's 'root' user receives the following mail:
server-1.my.lan : Mar 7 17:54:09 : apache : user NOT in sudoers ; TTY=unknown ; PWD=/var/www/html/admin ; USER=root ; COMMAND=/usr/local/bin/pihole status web
Web files are here: /var/www/html/admin
and here: /var/www/html/pihole
All files are owned by apache:apache.
Apache's conf file looks like this:
<VirtualHost *:80>
ServerName server-1.my.lan
DocumentRoot /var/www/html/admin
<Directory /var/www/html/admin/>
Options FollowSymLinks MultiViews
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/httpd/pihole_error.log
LogLevel warn
CustomLog /var/log/httpd/pihole_access.log combined
</VirtualHost>
Debug Token: https://tricorder.pi-hole.net/7ef0vwuht3
As it's a huge security hole to simply grant 'apache' SUDO access, I am assuming there is something else I need to do to fix this issue?
Any suggestions would be very much appreciated.
Thank you!