Last active
December 13, 2021 11:15
-
-
Save johnhpatton/420bedf58ed10be50bf05ef3fbd0cabb to your computer and use it in GitHub Desktop.
Nginx + Lua to mitigate CVE-2021-44228
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
# /etc/nginx/nginx.conf | |
# nginx plus implementation for RHEL hosts | |
load_module modules/ndk_http_module.so; | |
load_module modules/ngx_http_lua_module.so; | |
error_log /var/log/nginx/error.log error; | |
pid /var/run/nginx.pid; | |
lock_file /var/lock/nginx.lock; | |
worker_processes auto; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for" ' | |
'"$cve_2021_44228_log"'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
#tcp_nopush on; | |
keepalive_timeout 65; | |
#gzip on; | |
include /etc/nginx/conf.d/*.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment