I need to restrict access to certain files based on the query string parameter. I have a NGINX proxy that is in front of several other nginx web servers for load balancing. I decided to apply this query string parameter at the proxy level to consolidate the configuration changes. This complicated my setup a bit because the request cannot fall into the trap if it should be sent upstream.
server { listen 443;
Is there a way to store these 4 proxy lines in a location or variable and then redirect internally to one line? I can also use the same settings in different virtual hosts.
bmckim
source share