I have an AWS ALB and it is attached to multiple domain names. The ALB forwards the traffic to a EC2 machine with NGINX, here NGINX also has multiple domains associated with it.
I want to allow access to one of my domains from specific IP’s only. And all other domains should be accessible from 0.0.0.0/0.
Can this be done by modifying the configuration file for that domain only rather than modifying nginx.conf(such that the setting will be applicable to one domain alone)
P.S. The restrictions should be applicable only for a single domain.