- Audit log: every admin_log entry is also stored permanently in the database (admin/audit.php, audit.view) - Rate limits per account, login throttling per IP (not per account), emergency lock after mass deletions, force logout / lock in user management - Comments under gallery pictures (picture page, report button, owner can disable them) - Moderation: new members, links, reported content and a "moderate everything" switch go to the approval list (moderation.php) - Every uploaded image is re-encoded (strips appended code and EXIF data) - Custom 404 page, also shown for pages without permission Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 lines
1.3 KiB
ApacheConf
37 lines
1.3 KiB
ApacheConf
Options -Indexes
|
|
DirectoryIndex index.php index.html
|
|
AddDefaultCharset UTF-8
|
|
|
|
<IfModule mod_headers.c>
|
|
Header set X-Content-Type-Options "nosniff"
|
|
Header set X-Frame-Options "SAMEORIGIN"
|
|
</IfModule>
|
|
|
|
# Sensible Dateien/Ordner dürfen niemals ausgeliefert werden,
|
|
# auch wenn sie hier im Webroot liegen.
|
|
<FilesMatch "^config(\.example)?\.php$">
|
|
<IfModule mod_authz_core.c>
|
|
Require all denied
|
|
</IfModule>
|
|
<IfModule !mod_authz_core.c>
|
|
Deny from all
|
|
</IfModule>
|
|
</FilesMatch>
|
|
|
|
# includes/ und sql/ haben jeweils eine eigene .htaccess, die den Zugriff
|
|
# darauf sperrt (siehe includes/.htaccess und sql/.htaccess).
|
|
|
|
# Eigene Fehlerseite statt der weissen Standardseite des Servers (auch fuer gesperrte Ordner).
|
|
ErrorDocument 404 /404.php
|
|
ErrorDocument 403 /404.php
|
|
|
|
# Nicht vorhandene Seiten (z.B. /admin.php) direkt auf die Fehlerseite - sonst antwortet bei
|
|
# manchen Hostern PHP-FPM selbst mit "File not found." und die ErrorDocument-Regel greift nicht.
|
|
# Fehlende Dateien unter assets/ bekommen weiter die schlanke Standardantwort.
|
|
<IfModule mod_rewrite.c>
|
|
RewriteEngine On
|
|
RewriteCond %{REQUEST_URI} !^/assets/
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
RewriteRule ^ /404.php [L]
|
|
</IfModule>
|