Created
December 26, 2025 09:31
-
-
Save adinata-id/ba42df24c1eda95a67cf8553bc3f2ef9 to your computer and use it in GitHub Desktop.
Batasi akses langsung ke file-file shell nginx
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
| # Batasi akses langsung ke file-file shell | |
| location ~ ^/(bench\.sh|rdp\.sh|rdpn\.sh|arm\.sh|armn\.sh|cpcleanup\.sh|cleanup_lsphp_sessions\.sh|speedtest\.sh|mmac\.sh|autocleanup\.sh|ioncube\.sh|yabs\.sh)$ { | |
| set $deny_access 1; | |
| if ($http_user_agent ~* "(wget|curl)") { | |
| set $deny_access 0; | |
| } | |
| if ($deny_access = 1) { | |
| return 403; | |
| } | |
| root /var/www/your_path_website; # GANTI jika root folder-nya beda | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment