Re: Using dynamic access_log, automatically create parent directory

2015-07-28 Thread Francis Daly
On Sun, Jul 26, 2015 at 10:49:01PM -0400, justink101 wrote: Hi there, > We use a dynamic value for access logs: > > access_log /var/log/nginx/domains/$host/access.log main; > > However, if the $host directory does not exist in /var/log/nginx/domains > nginx fails with an error creating the

Using dynamic access_log, automatically create parent directory

2015-07-26 Thread justink101
We use a dynamic value for access logs: access_log /var/log/nginx/domains/$host/access.log main; However, if the $host directory does not exist in /var/log/nginx/domains nginx fails with an error creating the access log. Is there a way to have nginx create the $host directory automatically in