Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read nginx log files #24

Closed
Razkaroth opened this issue May 28, 2019 · 1 comment
Closed

Can't read nginx log files #24

Razkaroth opened this issue May 28, 2019 · 1 comment

Comments

@Razkaroth
Copy link

Hello, thanks for your work in this image.

I was trying to add some fail2ban filters to a custom image. I found the acces.log file under /usr/local/openresty/nginx/conf/logs/ but I can't see its content. Using vim to read the file outputs 'access.log' is not a regular file. And I can't find any other log files inside the container.

Any help is really appreciated.
Raz.

@Valian
Copy link
Owner

Valian commented May 28, 2019

Hi @Razkaroth!

You have this problem, because openresty image used as a base for this image, has the following line: https://github.com/openresty/docker-openresty/blob/master/alpine/Dockerfile#L110. Basically, access log and error log from these files are forwarded directly to connected stdout and stderr.

I'm pretty sure you need to add access_log and error_log directives like in this example https://docs.nginx.com/nginx/admin-guide/monitoring/logging/. Use non-default values and it should work.

@Valian Valian closed this as completed May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants