Feature Request for access_log stdout;

Andrew Hutchings ahutchings at nginx.com
Thu Feb 18 08:59:30 UTC 2016


Hi Aleksandar,

On 17/02/16 19:04, Aleksandar Lazic wrote:
> Hi.
>
> Am 17-02-2016 16:47, schrieb Valentin V. Bartenev:
>> On Wednesday 17 February 2016 16:26:01 Aleksandar Lazic wrote:
>>> Hi.
>>>
>>> how difficult is it to be able to add "access_log stdout;" to nginx,
>>> similar like "error_log stderr;"?
>>>
>>> I ask because in some PaaS environment is it difficult to setup a
>>> dedicated user yust for nginx.
>>>
>>> It fits also a little bit better to http://12factor.net/logs
>>>
>> [..]
>>
>> What's the problem with "access_log /dev/stdout"?
>
> Well I have the following problem on openshift v3.
>
> #######
> nginx: [alert] could not open error log file: open()
> "/var/log/nginx/error.log" failed (13: Permission denied)
> 2016/02/17 18:34:32 [warn] 1#1: the "user" directive makes sense only if
> the master process runs with super-user privileges, ignored in
> /etc/nginx/nginx.conf:2
> 2016/02/17 18:34:32 [emerg] 1#1: open() "/dev/stdout" failed (13:
> Permission denied)
>
> I have no name!@nginx-test-8-emwut:/$
> I have no name!@nginx-test-8-emwut:/$ ls -la /dev/stdout
> lrwxrwxrwx. 1 root root 15 Feb 17 18:24 /dev/stdout -> /proc/self/fd/1
> I have no name!@nginx-test-8-emwut:/$ id
> uid=1000550000 gid=0(root) groups=0(root)
> #######

What version of Docker are you running? If it is prior to 1.9 you are 
likely to hit his bug: https://github.com/docker/docker/issues/6880

Kind Regards
-- 
Andrew Hutchings (LinuxJedi)
Technical Product Manager, NGINX Inc.



More information about the nginx mailing list