how to block excluding specific url in nginx?

Francis Daly francis at daoine.org
Thu Nov 27 07:58:15 UTC 2014


On Wed, Nov 26, 2014 at 07:24:46PM -0500, goversation wrote:

Hi there,

> but I meant that location allow only "/" and  "/blah"
> I want to deny the others except "/"  

Use three locations.

 location = / { # allow }
 location /blah { # allow }
 location / { # deny }

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list