Open firewall to run nginx
I’m assuming this is nginx running on a Mac, but you’re not providing much details.


Quit the nginx process
Go to System Preferences: Security: Firewall: Firewall options, and remove nginx or anything else that is denied
Restart the nginx process


A dialog will appear asking you to grant the nginx process access to listen for incoming connections. You may need to configure port forwarding on your router as well.