https://bugzilla.novell.com/show_bug.cgi?id=790726
https://bugzilla.novell.com/show_bug.cgi?id=790726#c3
--- Comment #3 from IFAD Infrastructure Team 2012-11-21 15:18:05 UTC ---
When nginx is first started yes, it runs as root and it can open those files -
but when it is sent the USR1 signal, both the master and the workers, who run
as user "nginx", reopen the log files, as explained by Igor Sysoev here:
http://article.gmane.org/gmane.comp.web.nginx.english/181
As a matter of fact, the workers actually have open file descriptors to the log
files:
# ps axuwf|grep [n]ginx|head -2
root 2097 0.0 0.0 9460 1336 ? Ss Nov19 0:00 nginx: master
process /usr/sbin/nginx
nginx 2098 0.0 0.0 9464 2968 ? S Nov19 0:05 \_ nginx:
worker process
# lsof -p 2098|grep var.log|head -2
nginx 2098 nginx 2w REG 8,2 774994 904901
/var/log/nginx/error.log
nginx 2098 nginx 4w REG 8,2 3292942 907416
/var/log/nginx/access.log
So - what do you think is the best solution in this case? The only logs I've
configured to be written in /var/log/nginx are per-vhost and per-location
access logs - nothing special.
Thank you,
~Marcello
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.