Skip to content

Instantly share code, notes, and snippets.

@teknofire
Created July 27, 2018 03:28
Show Gist options
  • Save teknofire/4a9088f6084491ebc356b7d7a8b643f6 to your computer and use it in GitHub Desktop.
Save teknofire/4a9088f6084491ebc356b7d7a8b643f6 to your computer and use it in GitHub Desktop.
# add this near the top of the /var/opt//delivery/nginx/etc/server.d/elasticsearch_proxy.conf
# before the server { line but after the initial comment block
map $status $loggable {
~^[3] 0;
default 1;
}
# inside the server { block modify the access_log line to have the ` if=$loggable;` at the end
access_log /var/log/delivery/nginx/es_proxy.access.log opscode buffer=32k flush=10s if=$loggable;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment