Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Using dynamic access_log, automatically create parent directory (no replies)

$
0
0
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 instead of failing?

Seems like this should be default behavior?

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>