Just want to point this case where nginx won’t start and eventually
suggest a feature to avoid this situation.
nginx vhost is configured with the following directive:
where /domhome/some-random-domain.com/logs/access_log is in fact a
ls -la /domhome/some-random-domain.com/logs/access_log
lrwxrwxrwx 1 root root 46 Oct 2 05:31
The case is that if some folder in the path does not exist, e.g. the
folder 2011 is missing, or 10 is missing, then nginx won’t be able to
follow the symlink and create the access_log. It will just refuse to
start with the following error in the log:
2011/10/07 13:21:12 [emerg] 9105#0: open()
“/domhome/some-random-domain.com/logs/access_log” failed (2: No such
file or directory)
Can this behavior be adjusted, so that nginx creates all the folders in
the path and create the access_log itself, and start normally as
expected? Or is this inappropriate, and if so, why?