Recusive includes

Maxim Dounin mdounin at mdounin.ru
Mon Sep 21 13:12:15 UTC 2015


Hello!

On Fri, Sep 18, 2015 at 03:09:51PM -0400, justink101 wrote:

> If I want to include all config files within a directly, and all child
> directories what is the syntax:
> 
> If is still:
> 
> include /etc/nginx/*.conf
> 
> or is it:
> 
> include /etc/nginx/**/*.conf

The "include" directive uses OS glob() syntax, so you should use 
something like:

    include /etc/nginx/*/*.conf;

Note that two asterisks are only understood by some shells and 
won't be different from just one.  That is, don't expect recursive 
behaviour.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx mailing list