Configure Pi-hole with Apache

Follow these simple steps if you wan’t to set up Pi-hole on an existing Apache web server or if you wan’t to install Apache later on.

If you have allready installed Pi-hole with the included lighttpd web server this will not work.

Run the Pi-hole install:

curl -sSL | bash

When asked “Do you wish to install the web server” select “No”.

Finish the Pi-hole installation process and run:

sudo usermod -a -G pihole www-data

Then install sqlite3:

sudo apt install php-sqlite3

Restart Apache:

sudo service apache2 restart

If you don’t allready have PHP installed you will also need to run:

sudo apt install php libapache2-mod-php

And restart Apache again:

sudo service apache2 restart

If you have successfully set up Pi-hole with Apache the address http://ip-address/admin should now work.

Leave a Reply