How to disable logging in nginx on root only? -
i store access logs uri other "/" particular server. however, due frequent pings on root uri, wan't disable logging uri. i'm using nginx 1.10.3. relevant configuration is:
http { access_log /var/log/nginx/access.log; } server { access_log off; location ~ ^/$ { access_log /var/log/nginx/example_com_access.log combined; } }
i have tried several configurations of access_log parameters. example,
- turning logging on server , off location
- using different methods match location (i.e. =, ~, (none), etc.)
everything i've tried seems either log every request or log no requests server. ideas how accomplish this?
Comments
Post a Comment