Forum: NGINX nginx priority for rewrite and access restriction

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
kay (Guest)
on 2014-05-27 14:20
(Received via mailing list)
I would like to enable /123 location only for locahost, but it doesn't
nginx return 302 redirect with header. It seems rewrite directive has
priority than access module.

    location /123 {
                satisfy all;
                deny    all;
                add_header Set-Cookie "cookie=123; Domain=localhost";
                rewrite ^ / redirect;

How to restrict access for /123 location without "if"?

Posted at Nginx Forum:,250391,250391#msg-250391
This topic is locked and can not be replied to.