Ruby on rails 如何阻止前台停靠的nginx淹没日志?
我正在supervisord管理的docker容器中运行nginx和unicorn。Ruby on rails 如何阻止前台停靠的nginx淹没日志?,ruby-on-rails,nginx,docker,supervisord,Ruby On Rails,Nginx,Docker,Supervisord,我正在supervisord管理的docker容器中运行nginx和unicorn。 所以,supervisord是docker指挥部。它反过来会产生nginx和unicorn。麒麟通过插座与nginx通话。nginx侦听端口80 我还运行了一个LogSpoutDocker容器,基本上通过收听docker.sock将所有docker日志传输到papertrail 问题在于,nginx不断地向日志中输出数千条平凡的条目: 172.31.45.231---[25/May/2016:05:53:33+
所以,supervisord是docker指挥部。它反过来会产生nginx和unicorn。麒麟通过插座与nginx通话。nginx侦听端口80 我还运行了一个LogSpoutDocker容器,基本上通过收听docker.sock将所有docker日志传输到papertrail 问题在于,nginx不断地向日志中输出数千条平凡的条目:
172.31.45.231---[25/May/2016:05:53:33+0000]“GET/HTTP/1.0”200 12961 0.0090
我正试图禁用它
到目前为止,我已经:
访问日志/dev/null代码>在nginx.conf
和vhost文件中
[supervisord]
nodaemon=true
loglevel=warn
[program:unicorn]
command=bundle exec unicorn -c /railsapp/config/unicorn.rb
process_name=%(program_name)s_%(process_num)02d
numprocs=1
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
redirect_stderr=true
[program:nginx]
command=bash -c "/usr/sbin/nginx -c /etc/nginx/nginx.conf"
stdout_logfile=/dev/null
stderr_logfile=/dev/null
您可以尝试使用以下方法:
目标仍然是修改nginx映像使用的nginx.conf
access_log off;