The default access/error logs are access.log and error.log: nginx http access log file: "/usr/local/nginx/logs/access.log" nginx error log file: "/usr/local/nginx/logs/error.log" We set them to access_log and error_log: ./configure --http-log-path="${EPREFIX}"/var/log/${PN}/access_log --error-log-path="${EPREFIX}"/var/log/${PN}/error_log Even if you set "error_log /var/log/nginx/error.log error;" in nginx.conf, you'll have an empty /var/log/nginx/error_log I think it would be nice to use the same names as upstream does (access.log / error.log). Thanks.
This is complicated: Upstream is using file specified via --error-log-path configure option to log config parser issues. Upstream's idea is that you should have a chance to catch broken config especially during unattended boot. See https://trac.nginx.org/nginx/ticket/147 for more details. I wish that upstream would provide a command-line argument to allow people to overwrite configure path at runtime because whatever name we will pick, there will be always user who want to use a different name/location. Regarding chosen names: I can only speculate why Gentoo picked {access,error}_log instead of {access,error}.log as filename. I assume to match with Apache log names. I am not sure if we should change this. Although I am using *.log naming schema by myself we must assume to some point that user already found out about the problem that nginx is always using file from --error-log-path option and have adopted to that file and naming. Maybe ebuild could read from NGINX_DEFAULT_ERROR_LOG environment variable for example allowing user to set a different path in configure...
Thanks for the explanation, didn't know that.