ansible-nginx icon indicating copy to clipboard operation
ansible-nginx copied to clipboard

it is impossible to set *_log: off;

Open ser opened this issue 9 years ago • 2 comments

It's not possible to switch off logging.

ser avatar Sep 24 '16 11:09 ser

It's possible, just not documented, nginx_http_access_log: "off" does the trick.

ser avatar Sep 24 '16 11:09 ser

No, it is impossible to do that on "server" level. The workaround is to set access_log to /dev/null, but it's not correct and definitely it should be possible to set it to "off".

The code responsible for screwing things up is here:

https://github.com/debops/ansible-nginx/blob/3f1e11978ca60af6b2ad1cd6547f92eb976b46dd/templates/etc/nginx/sites-available/default.conf.j2#L211

ser avatar Sep 24 '16 11:09 ser