Port 80 fowarding confusion

Hi, in the documentation of pihole for docker it is mentioned the following:

You can still map other ports to Pi-hole port 80 using docker's port forwarding like this -p 8080:80 , but again the ads won't render properly

Since I am already using port 80 to serve a web page, I am forwarding port with -p 8080:80 and I am using nginx to forward the request from :80 to :8080 as followed.
image
I don't want to use my-domain-name.com in the server_name because it is already used for my web page. Is this supposed to work as is ? Or is the domain name mandatory to be set in the server_name field ?
By doing so, I am currently facing a "DNS Resolution is currently unavalaible"..