Dateien nach "docker/nginx" hochladen

This commit is contained in:
2026-07-28 10:15:31 +00:00
parent ad34fd7f4a
commit 3b373ecf18
+35
View File
@@ -0,0 +1,35 @@
server {
listen 80;
server_name _;
root /var/www/html;
index index.php index.html;
# Datenordner (SQLite-Datenbank) niemals über den Browser ausliefern.
# Ersetzt die .htaccess-Regel, die unter nginx nicht greift.
location ^~ /data/ {
deny all;
return 404;
}
# Interne PHP-Ordner ebenfalls sperren
location ^~ /includes/ {
deny all;
return 404;
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass php:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Versteckte Dateien (z.B. .htaccess, .git) nicht ausliefern
location ~ /\. {
deny all;
}
}