Skip to content

Instantly share code, notes, and snippets.

@alex-popov-tech
Created November 12, 2018 14:35
Show Gist options
  • Save alex-popov-tech/1dd130f680930627822e1dd4c98bc871 to your computer and use it in GitHub Desktop.
Save alex-popov-tech/1dd130f680930627822e1dd4c98bc871 to your computer and use it in GitHub Desktop.
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
http {
include /etc/nginx/mime.types;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
log_format postdata $request_body;
map $request_body $matched {
"~*true" 1;
default 0;
}
server {
location ~ /$ {
access_log /var/log/nginx/access.log postdata;
echo_read_request_body;
if ($matched = 0) { return 503; }
if ($matched = 1) { return 504; }
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment