Hello, Thanks for that... I thought the ^~ was meaning 'starting with regex'... My bad!
I changed the symbol for some of the ones relly meaning 'regex' (~*) and it works! :o) If there is no better way than sticking with 'if', then it's all good. Thanks again, problem solved, --- *B. R.* On Sun, Mar 10, 2013 at 6:46 AM, Francis Daly <fran...@daoine.org> wrote: > On Sun, Mar 10, 2013 at 05:29:18AM -0400, B.R. wrote: > > Hi there, > > > The *correct* way: > > location ^~ /documents/(\w+) { > > set $user $1; > > if ($user != $remote_user) { > > return 503; > > } > > } > > > > Although the syntax is now OK and the configuration is able to be > reloaded, > > it doesn't seem to work at all... > > I haven't tested the "if" part; but in this case it's mostly likely that > this location{} block is not being used at all. > > Your configuration is syntactically correct, so nginx can load it. > > But it is not semantically correct, as in "it does not mean what you want > it to mean". > > http://nginx.org/r/location > > "^~" does not mean "this is a regex location" > > f > -- > Francis Daly fran...@daoine.org > > _______________________________________________ > nginx mailing list > nginx@nginx.org > http://mailman.nginx.org/mailman/listinfo/nginx >
_______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx