I am using nginx to access various services on a machine. Therefor I added specific logfiles for each proxied service:
location /errorcodes/ {
include /etc/nginx/sinatra_params;
proxy_pass http://localhost:4567/;
access_log /var/log/nginx/errorcodes-access.log;
error_log /var/log/nginx/errorcodes-error.log;
}
Now it seems that location specific logfiles are treated different than the global logfiles, for the owner and group and also the access rights differ to those from the global nginx logfiles.
The default access log for example is created like
-rw-r----- 1 www-data adm 3,0K Sep 16 09:31 access.log
whereas the location specific log is created like
-rw-r--r-- 1 root root 173 Sep 16 09:44 errorcodes-access.log
I don't think that's such a big problem, but I would like to understand what's going on here. So why are the location specific logfiles treated different.