Created
November 12, 2018 14:35
-
-
Save alex-popov-tech/1dd130f680930627822e1dd4c98bc871 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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