Created
February 28, 2025 14:02
-
-
Save felipekm/b0b348dfbd6e6364528ee504ad66a72e to your computer and use it in GitHub Desktop.
NGINX - Enhance security by blocking malicious requests and logging threats.
This file contains hidden or 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
server { | |
location /api/ { | |
deny 192.168.1.100; # Block specific IPs | |
error_page 403 /403.html; | |
access_log /var/log/nginx/api.log; # Log all requests | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment