How to get Pihole to run on NGINX with OMV5?

The issue I am facing: I have managed to run Pihole on lighttpd and OMV5 on NGINX, but when I try to get pihole to run on NGINX so I only have one web server running, I run into a plethora of issues.

At first, I had OMV5 running and configured, then I downloaded pihole and was apparently able to install the packages and dependencies I needed, but when I went to run the pihole web admin page, nothing came up.
I then decided to just do everything from a fresh install. That means formatting the SSD and installing a fresh Raspberry Pi OS Lite, then setting up the pi and installing OMV5 making sure to configure nothing but the static IP since pihole needs a static IP address to work properly. Then installing pihole, once again completely configured. My logic is, just get the services on the device and I can configure after to make sure they work together. However running this NGINX install/config guide, after running:

apt-get -y install nginx php7.3-fpm php7.3-cgi php7.3-xml php7.3-sqlite3 php7.3-intl apache2-utils

I get this:

pi@raspberrypi:~ $ sudo apt-get -y install nginx php7.3-fpm php7.3-cgi php7.3-xml php7.3-sqlite3 php7.3-intl apache2-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
nginx is already the newest version (1.14.2-2+deb10u3).
nginx set to manually installed.
php7.3-cgi is already the newest version (7.3.27-1~deb10u1).
php7.3-cgi set to manually installed.
php7.3-fpm is already the newest version (7.3.27-1~deb10u1).
php7.3-fpm set to manually installed.
php7.3-xml is already the newest version (7.3.27-1~deb10u1).
php7.3-xml set to manually installed.
The following additional packages will be installed:
  libapr1 libaprutil1
The following NEW packages will be installed:
  apache2-utils libapr1 libaprutil1 php7.3-intl php7.3-sqlite3
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 525 kB of archives.
After this operation, 1368 kB of additional disk space will be used.
Err:1 http://raspbian.raspberrypi.org/raspbian buster/main armhf libapr1 armhf 1.6.5-1
  Could not resolve 'raspbian.raspberrypi.org'
Err:2 http://raspbian.raspberrypi.org/raspbian buster/main armhf libaprutil1 armhf 1.6.1-4
  Could not resolve 'raspbian.raspberrypi.org'
Err:3 http://raspbian.raspberrypi.org/raspbian buster/main armhf apache2-utils armhf 2.4.38-3+deb10u4
  Could not resolve 'raspbian.raspberrypi.org'
Err:4 http://raspbian.raspberrypi.org/raspbian buster/main armhf php7.3-intl armhf 7.3.27-1~deb10u1
  Could not resolve 'raspbian.raspberrypi.org'
Err:5 http://raspbian.raspberrypi.org/raspbian buster/main armhf php7.3-sqlite3 armhf 7.3.27-1~deb10u1
  Could not resolve 'raspbian.raspberrypi.org'
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/a/apr/libapr1_1.6.5-1_armhf.deb  Could not resolve 'raspbian.raspberrypi.org'
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/a/apr-util/libaprutil1_1.6.1-4_armhf.deb  Could not resolve 'raspbian.raspberrypi.org'
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/a/apache2/apache2-utils_2.4.38-3+deb10u4_armhf.deb  Could not resolve 'raspbian.raspberrypi.org'
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/php7.3/php7.3-intl_7.3.27-1~deb10u1_armhf.deb  Could not resolve 'raspbian.raspberrypi.org'
E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/pool/main/p/php7.3/php7.3-sqlite3_7.3.27-1~deb10u1_armhf.deb  Could not resolve 'raspbian.raspberrypi.org'
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

my first thought is why isn't raspbian.raspberrypi.org resolving?

Details about my system: Running another raspberry pi4 with pihole on my network. It's also doing DNS and DHCP and running unbound. on this pi I have a fresh unconfigured install of OMV5 except for static IP and unconfigured install of pihole. Didn't install lighttpd on it at all

**What I have changed since installing Pi-hole:**Haven't really changed anything. Can't get past the second command line input in the guide I mentioned above.

Any help would be appreciated and feel free to ask if I haven't provided enough context. Thank you

Is that domain inaccessible from other clients as well, or just from your RPi?

On your RPi, do the following commands succeed?

dig raspbian.raspberrypi.org
dig @1.1.1.1 raspbian.raspberrypi.org

If only the second succeeds while the first fails, check the nameservers your RPi itself is using in /etc/resolv.conf. Try adding a public nameserver (e.g. 1.1.1.1) if none is currently shown, and see if you are able to continue your installation.

I found out pihole FTL got turned off when I installed OMV5. I stopped getting those errors one I renabled it, but I'm still having my issue of not being able to access pihole GUI after installing omv5.

I think my issue is trying to run Pihole on OMV5 without Docker. Is that possible? The config file is one that OMV5 controls so any changes I make to it don't register.

There is no recent info on running Pi-Hole this way so I am a little lost.

I used this guide: NGINX - Pi-hole documentation

A dockered Pi-hole would most likley work once fitted with the correct port mapping.
It does so because the Docker image encapsulates the OS plus Pi-hole plus lighttpd.

Since your stated motivation for trying to integrate Pi-hole into nginx was to get rid of lighttpd, running a Docker Pi-hole won't match that.

As you already succeeded in running a bare-metal Pi-hole along with OMV before, that solution would certainly require less resources than adding Docker to the bill.

What config file are you referring to?

My suggestion to edit resolv.conf would have just taken care of DNS resolution being available during Pi-hole installation (as that was your original issue).

I wasn't very clear, but I've succeeded in getting NGINX to host pihole alone, but that broke once I installed OMV5. When I tried installing omv5 first, then pihole, I haven't been able to get it to work.

The config file I'm referring to is

/etc/NGINX/sites-available/default

as per this link:
https://openmediavault.readthedocs.io/en/5.x/various/files.html

Would running a pihole debug and posting the token help at all? I'm off of work for the next few days ago I'm really trying to focus to get this to work.

Apparently no one runs pihole with OMV5 this way because there's no current information about this configuration anywhere I've searched online yet.

I don't know OMV5, but I'm going to assume it is expecting to be in control of its webserver just as Pi-hole is.

Hosting them side-by-side on the same nginx webserver will have them fight over who's the default server. If you're fluent enough in nginx, you may even manage to get them to co-exist somehow, but then the next update for either OMV or Pi-hole is likely to ruin your configuration again.

To me, it seems you have two valid options to run Pi-hole and OMV5 on the same machine:
a) run Pihole on lighttpd and OMV5 on nginx, as you already succeeded with
b) use OMV's built-in Docker feature to host a dockered Pi-hole

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.