Translating apache config to nginx

Grant emailgrant at gmail.com
Fri Feb 21 15:36:20 UTC 2014


>> >> location ~ ^(?!installer)(\.?[^\.]+)$ {
>> >>     deny all;
>> >> }
>
>> > Alternatively: what request do you make? What response do you expect? And
>> > what is the regex above intended to do?
>>
>> I actually got these apache deny directives from the roundcube list.
>
> Possibly the roundcube list will be able to explain, in words, what the
> intention is.
>
> Then someone may be able to translate those words into an nginx config
> fragment.


Here is the description:

"deny access to files not containing a dot or starting with a dot in
all locations except installer directory"

Should the following accomplish this in nginx?  It gives me 403 during
normal operation.

location ~ ^(?!installer)(\.?[^\.]+)$ {
    deny all;
}

- Grant



More information about the nginx mailing list