Hi,
I just wanted to let you know there might be a problem with installing PiHole from dietpi-software!
I tried to get it to work using dietpi-software but it just didn’t work.
I tried multiple clean installs but had no success! It was constantly giving me a 404 Error when i tried to access the admin page.
Then i tried to install it using
curl -sSL https://install.pi-hole.net | bash
This worked perfectly without any issues!
You might want to look into this.
Regards.
Hi Zombie,
Thanks for the report.
Tested with clean install on C2 with dietpi-software, http://192.168.0.112/pihole working as expected.
Which device was this on? And which webserver choice did you use (default is lighttpd)?
It was a Raspberry Pi 1 Model B
I tried for more than 2 Hours with multiple clean installs but it didn’t work.
Then using the official method without dietpi-software, it worked first time without any issues.
Were you using /admin or /pihole?
At first I tried /admin and got a 404 then realised that it’s actually /pihole and everything worked fine
i was using /admin
This is what the installer told me to do!
I had no idea about /pihole
I guess that was the issue!
with the official installation method it works with /admin
EDIT:
I just checked the DietPi Software Thread here in the Forum and there it also states that it should be /pihole.
so my fault. i should have double checked!
I think it’s a fair confusion, as you say the installer also says it will be at /admin and also spits out a password (which is useless because the password by default is dietpi…) potentially there could be a couple of bits of tidying to this install to make it clear how the DP version differs from the main version?
rothchild:
I think it’s a fair confusion, as you say the installer also says it will be at /admin and also spits out a password (which is useless because the password by default is dietpi…) potentially there could be a couple of bits of tidying to this install to make it clear how the DP version differs from the main version?
Yep, no worries.
Ok so theres a few adjusments we make, mostly to allow for multiple use of the web server, not dedicated it to PiHole, and, prevent PiHole from overwriting the current lighttpd.conf:
# Assure that mod_php is purged in favour of PHP-FPM
G_AGP 'libapache2-mod-php*'
G_EXEC rm -Rf /{etc/php,var/lib/php/modules}/*/apache2
# PHP-FPM
if (( ${aSOFTWARE_INSTALL_STATE[83]} > 0 || ${aSOFTWARE_INSTALL_STATE[84]} > 0 || ${aSOFTWARE_INSTALL_STATE[85]} > 0 ))
then
# Optimisations based on total cores
G_CONFIG_INJECT 'pm.max_children[[:blank:]=]' "pm.max_children = $(( $G_HW_CPU_CORES * 3 ))" "/etc/php/$PHP_VERSION/fpm/pool.d/www.conf"
After that, during configuration, we symlink /pihole to /html/admin, as per our online doc:
# TigerVNC: Set control + read-only passwords
if [[ ${aSOFTWARE_INSTALL_STATE[28]} == 1 && ! -f '/root/.vnc/passwd' ]]
then
[[ -d '/root/.vnc' ]] || G_EXEC mkdir /root/.vnc
tigervncpasswd -f <<< "$GLOBAL_PW
$GLOBAL_PW" > /root/.vnc/passwd
G_EXEC chmod 600 /root/.vnc/passwd
fi
# RealVNC: Set virtual + shared desktop passwords, repeat virtual password command two times: https://github.com/MichaIng/DietPi/pull/4679#issuecomment-908196511
if [[ ${aSOFTWARE_INSTALL_STATE[120]} == 1 && ! -s '/root/.vnc/config.d/Xvnc' ]]
then
vncpasswd -virtual <<< "$GLOBAL_PW
$GLOBAL_PW"
As our DietPi web server paths are standardized and relative in /var/www (eg: /var/www/myfolder/website_1 = http://ip/myfolder/website_1 ), the actual location of the PiHole web page (via the official installer) is /var/www/html/admin and therefor the link is http://ip/html/admin
So either of the following will work:
http://ip/html/admin
http://ip/pihole
But I will update the code to create a symlink so the following also works, to prevent this occurring again:
http://ip/admin
https://github.com/Fourdee/DietPi/issues/703
Your Admin Webpage login password is 1XR2_UbZ
Also looks like this a new addition. Previously, no password was set for the web interface, hence we do it during install and set to dietpi after PiHole installer is finished.
Thanks guys,
resolved for v142. Let me know if theres anything else
Perfect!
Thanx Fourdee! I will test it as soon v142 is released and will let you know about the outcome!
Hi,
After v142 was released, i did another clean install of DietPi and chose PiHole installation in dieti-software.
Now everything works flawlessly out of the box.
/pihole and /admin both work without any issues.
Great Work as always FourDee.
Now i need to go and annoy the PiHole developers in order to get them to block social media buttons…