We use a number of application-servers fronted by NGinx. We now wish to restrict access to some of the apps by the proxy, but still allow the scripts running on the same host and internal LAN to bypass the new authentication.

To this end we added the following to the config:

satisfy any;
deny all;

However, this allows all requests to get in -- presumably, because the proxying is done to and thus all requests match the above "allow" rule.

What are we doing wrong? What the right approach?

  • Have you tried using another loopback IP address for the proxied connections instead; e.g. set the proxy to forward to instead of That way, you can distinguish between the two and filter accordingly.
    – Pak
    Aug 15 '17 at 21:20
  • proxy_pass has nothing to do with allow. Show full config
    – Alexey Ten
    Aug 16 '17 at 5:48

Ok, we found the reason and NGinx is innocent. A (seemingly) unrelated change to the setup was introduced recently redirecting HTTP to HTTPS. In our setup -- for reasons that are hard to explain -- the SSL-connections are terminated by HAProxy running on the same machine.

So, all HTTP connections are redirected to HTTPS first and then the SSL ones all appear (to NGinx) to originate from Sorry for the noise and thanks to all trying to help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.