Created
November 12, 2018 22:16
-
-
Save alex-popov-tech/e2d308c5500476a6a197d975d438bee1 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 '$remote_addr - $remote_user [$time_local] ' '"$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" $request_time req_body:"$request_body"'; | |
map $request_body $matched { | |
"~.*true.*" "1"; | |
default ""; | |
} | |
server { | |
location ~ /$ { | |
echo_read_request_body; | |
access_log /var/log/nginx/access.log postdata; | |
if ($matched) { return 503; } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment