Upload via GUI (258 Dateien)
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
|
||||
# ── Bot & Scanner Schutz ──────────────────────────────────────────────────
|
||||
# Bekannte böswillige Bots blockieren
|
||||
RewriteCond %{HTTP_USER_AGENT} (masscan|nikto|sqlmap|nmap|zgrab|python-requests/2\.2[0-9]|scrapy|dirbuster|gobuster|nuclei) [NC]
|
||||
RewriteRule ^ - [F,L]
|
||||
|
||||
# Leere User-Agents blockieren
|
||||
RewriteCond %{HTTP_USER_AGENT} ^-?$
|
||||
RewriteRule ^ - [F,L]
|
||||
|
||||
# Direkt-IP-Zugriff ohne Host verhindern (optional)
|
||||
# RewriteCond %{HTTP_HOST} !^yourdomain\.com$
|
||||
# RewriteRule ^ - [F,L]
|
||||
|
||||
# Clickjacking-Schutz
|
||||
Header always set X-Frame-Options "SAMEORIGIN"
|
||||
Header always set X-Content-Type-Options "nosniff"
|
||||
|
||||
# Schützt interne Verzeichnisse vor direktem Web-Zugriff.
|
||||
# Funktioniert mit Apache (mod_rewrite/mod_authz aktiv). Bei nginx siehe README.md.
|
||||
|
||||
RewriteEngine On
|
||||
RewriteCond %{REQUEST_URI} ^/(includes|config|database|cron)/ [NC]
|
||||
RewriteRule ^ - [F,L]
|
||||
|
||||
# Entwicklungs- und Hilfsordner sowie interne Dateien gehören nicht ins Web (Tests, Werkzeuge, Quelltexte der Apps, Paketquellen)
|
||||
RewriteCond %{REQUEST_URI} ^/(tests|tools|docs|desktop|mobile|theme-packages|vorschaubilder|plugin-webseite|\.git|\.gitea|\.github|backups|plugins/[^/]+/(lib|migrations))(/|$) [NC]
|
||||
RewriteRule ^ - [F,L]
|
||||
RewriteCond %{REQUEST_URI} \.(sqlite3?|db|sql|log|bak|old|orig|swp|md|sh|bat|ps1|pem|key|env|ini|lock|dist)$ [NC,OR]
|
||||
RewriteCond %{REQUEST_URI} ^/(offen\.txt|install\.sh|install_windows\.bat|composer\.(json|lock)|package(-lock)?\.json)$ [NC]
|
||||
RewriteRule ^ - [F,L]
|
||||
|
||||
# version.php nur intern zugänglich
|
||||
RewriteCond %{REQUEST_URI} ^/version\.php$ [NC]
|
||||
RewriteRule ^ - [F,L]
|
||||
|
||||
<IfModule mod_php.c>
|
||||
php_flag display_errors off
|
||||
</IfModule>
|
||||
|
||||
Options -Indexes
|
||||
Reference in New Issue
Block a user