ngxtop icon indicating copy to clipboard operation
ngxtop copied to clipboard

How to read log from Nginx Docker

Open Maatary opened this issue 6 years ago • 1 comments

The official Nginx Docker image does a redirection of access.log to /dev/stdout, so that one can access the log with docker log from outside docker i.e. on the host. This is an issue because then from within the docker container I can't access access.log.

I finally resorted to install nginx on my mac and perform the following command docker logs -f competent_edison &>> ~/Dev/monitoring/access.log

While the redirection works fine and the access.log on my mac, mirror the output of the container in realtime, ngxtop output nothing when i pass that file as parameter: ngnix -l ~/Dev/monitoring/access.log

I wonder if there is a way for ngxtop to be installed on an host, to monitor an nginx running in a container.

Please any indication would be helpful as i spend 2 days around that and can't figure out how to deal with it.

Maatary avatar Nov 10 '18 20:11 Maatary

@Maatary Hi, has this problem been solved?

cmjzzx avatar Mar 30 '22 07:03 cmjzzx