Just disble nginx logs?


If I run “sudo graylog-ctl disable-internal-logging” I loose all internal logging.
But I prefer just to get rid of the NGINX logging instead.

I couldn’t find a good way to do that. (On the virtual appliance I could not find the config file for nginx to disable access logging there.)

There is something odd as I tried to get rid of the nginx logging.

I tried:
sudo graylog-ctl disable-internal-logging

==> No succes.

Then I tried:
sudo graylog-ctl disable-internal-logging
sudo graylog-ctl reconfigure

==> No dice

So how can I get rid of just the NGINX logging from my own system?

Hey @hvdkooij,

locate the Nginx configuration directory /etc/nginx/conf.d/ (or unlikely /opt/nginx/conf/), or the main configuration file (etc/nginx/nginx.conf) and look for the server block that creates the logs. Add these lines:

server {
    access_log off;
    error_log off;

This will disable logging for the given server block.

Disclaimer: This is a guessed answer. I never worked with the Graylog OVA.

Greetings - Phil

It seems the files are locate in a different directory on the virtual appliance.

So I went for:
sudo vi /opt/graylog/conf/nginx/nginx.conf
==> Disable Access Log

1 Like