Skip to content

Instantly share code, notes, and snippets.

@karlseguin
Created October 22, 2021 13:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlseguin/33724a602a896ad020d5a0a876f610d4 to your computer and use it in GitHub Desktop.
Save karlseguin/33724a602a896ad020d5a0a876f610d4 to your computer and use it in GitHub Desktop.
basic nginx waf
# WAFs are a waste of time. False positives negatively impact actual users.
# And for what? Protection against vulnerabilities that, if you still have
# in this day in age, you're in more trouble than you think.
# Still, to keep my logs clean, I like to run something like the follwoing:
location ~ \.php$ { access_log off; return 444; }
location ~ \.asp$ { access_log off; return 444; }
location ~ \.aspx$ { access_log off; return 444; }
location ~ /Admincenter/ { access_log off; return 444; }
location /console/ { access_log off; return 444; }
location /api/jsonws { access_log off; return 444; }
location /Autodiscover/ { access_log off; return 444; }
location /wp-content/ { access_log off; return 444; }
location /wp-includes/ { access_log off; return 444; }
location /solr/ { access_log off; return 444; }
location /mifs/ { access_log off; return 444; }
location /.env { access_log off; return 444; }
location /data/admin/allowurl.txt { access_log off; return 444; }
location wlwmanifest.xml$ { access_log off; return 444; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment