Finanzmanager/nginx/default.conf
fds2610-bot b1712bb7ea Phase 0: Projektgerüst mit nginx, php-fpm und MariaDB
Docker Compose mit drei Services (nginx auf Port 8000), Migrationsmechanik,
Update- und Backup-Skript. Anwendung: Router mit CSRF-Prüfung, Anmeldung und
Ersteinrichtung, zentraler Einstellungsdialog mit Reitern, ein- und
ausschaltbares Debug-Log mit Maskierung von Zugangsdaten.

Layout nach Vorbild des FinanzManagers: feste Navigation links,
Werkzeugleiste oben, Tab-Leiste; Farbschema hell/dunkel/System.

Tests: 51 PHP-Prüfungen und 7 Playwright-Tests, alle grün.
2026-08-09 20:21:42 +02:00

45 lines
1.2 KiB
Text

server {
listen 80;
server_name _;
root /var/www/html/public;
index index.php;
charset utf-8;
client_max_body_size 32m;
# Sicherheits-Header. Content-Security-Policy ist bewusst streng: die
# Anwendung lädt weder externe Skripte noch externe Stylesheets.
add_header X-Content-Type-Options "nosniff" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header Referrer-Policy "same-origin" always;
add_header Content-Security-Policy "default-src 'self'; img-src 'self' data:; style-src 'self'; script-src 'self'; frame-ancestors 'self'" always;
# Statische Dateien direkt ausliefern, alles andere an den Front-Controller.
location /static/ {
try_files $uri =404;
access_log off;
expires 1h;
}
location / {
try_files $uri /index.php$is_args$args;
}
location ~ ^/index\.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_read_timeout 300;
}
# Kein direkter Aufruf anderer PHP-Dateien.
location ~ \.php$ {
return 404;
}
location ~ /\. {
deny all;
}
}