Questions about local hosts, local domains

Using .local as your local DNS domain name may work in your network, but I'd advise against using it in general, since .local is the default domain name used by mDNS, as implemented e.g. by Apple's Bonjour or Linux' avahi software (recent Windows and Android versions have mDNS support as well)

This also means an mDNS-aware OS will be able to resolve .local domains regardless of any DNS server's presence, e.g. I can ping my RPi as raspberrypi.local though my local domain name is fritz.box (but can't do so from a Win7 client). Note that an mDNS hostname does not necessarily match the name of the device your DNS is aware of, especially if you've configured a custom name in Pi-hole or your router.

The question that springs to mind then:
In your previous installation, did Pi-hole act as DHCP server and distribute .local as domain name, or have you perhaps been relying on mDNS name resolution all the way in the past?
(Unlikely if you have been using Win7 clients).

To rule out potential interferences from mDNS, I'd recommend to use Pi-hole's default .lan name or anything else but .local and see if that works.

DNS provides hostname resolution, nginx doesn't.

Whenever you want an IP address to be associated with a specific hostname, you'd want to create a respective DNS record, e.g. by using Pi-hole's Local DNS record UI.