Just disble nginx logs?


(Hugo van der Kooij) #1

Hi,

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.)


(Hugo van der Kooij) #2

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

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

==> No succes.

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

==> No dice

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


(Philipp Ruland) #3

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


(Hugo van der Kooij) #4

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