valid_referers directive not working correctly

justin nginx-forum at
Mon Nov 12 09:46:49 UTC 2012

Very strange, moving the directive into the server block, now blocks
everything, including requests from my own server.

 valid_referers server_names *;
 if ($invalid_referer) {
    return 403;

Strange that when the code was copied twice into the / location bllock and
php match block it worked.

Posted at Nginx Forum:,232722,232727#msg-232727

More information about the nginx mailing list