dokuwiki not in root problem of regexp

Francis Daly francis at
Sat Jun 30 12:13:30 UTC 2012

On Fri, Jun 29, 2012 at 09:32:21PM -0400, Jiff wrote:

Hi there,

I don't know dokuwiki, so this is all untested, but...

> Original dirs exclusion: 
>    location ~ /(data|conf|bin|inc)/ {
>       deny all;
>    }
> Of course, this won't work w/ my changes,

...why "of course"?

The original example wanted to block access to /data/ and
/something/data/; you now want to block access to /dokuwiki/data/
and /dokuwiki/something/data/.

This location block will match all of those (depending on what else is
in your config file).

> In my mind it _should_ be: "location ~/dokuwiki/(data|conf|bin|inc)/"

That looks to me like it should also work...

> but it don't work, sniff. there is something else going on.

What one url did you access to test this?

What response did you see?

What response did you expect to see?

If you provide your config file, or at least the full list of top-level
location definitions, someone may be able to point out why the second
and third answers differ.

Does the example config in provide any
useful hints?

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list