nginx allow all doesn't work

16,567

try putting satisfy any; in your configuration. That tells nginx to accept either http authentication, or IP restriction. By default, when you define both, it will expect both.

http://wiki.nginx.org/HttpCoreModule#satisfy

Share:
16,567
James Lin
Author by

James Lin

Passionate about writing software to solve real life problems.

Updated on June 04, 2022

Comments

  • James Lin
    James Lin almost 2 years

    I am trying to allow pinterest to access to my dev site's images, currently nginx deny.conf is using auth_basic and a list of allow IPs. There is no deny all in there. satisfy any is also in deny.conf

    I added allow allto my site's config and restarted/reloaded nginx but still getting access denied from pinterest.

    location ^~ ^/(cache|media|static)/ {
            allow all;
            access_log off;
            expires 1y;
        }
    

    Any ideas?