Forum: NGINX nginx priority for rewrite and access restriction

2974d09ac2541e892966b762aad84943?d=identicon&s=25 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
work,
nginx return 302 redirect with header. It seems rewrite directive has
higher
priority than access module.

    location /123 {
                satisfy all;
                allow   127.0.0.1/32;
                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:
http://forum.nginx.org/read.php?2,250391,250391#msg-250391
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.