Files
AFC-Demo/deploy/nginx/nginx.default.conf.template
T

46 lines
1.3 KiB
Plaintext
Raw Normal View History

2025-10-23 12:22:27 +02:00
server {
listen 80;
server_name ${SERVER_NAME};
root /var/www/html/public;
index index.php;
2025-10-23 13:05:17 +02:00
# Cache-Control für statische Dateien
2025-10-23 12:22:27 +02:00
location ~* \.(?:ico|css|js|gif|jpe?g|png|svg|woff2?|eot|ttf|otf|webp|avif)$ {
expires 7d;
add_header Cache-Control "public, max-age=604800, immutable";
try_files $uri =404;
2025-10-23 13:05:17 +02:00
access_log off;
2025-10-23 12:22:27 +02:00
}
2025-10-23 13:05:17 +02:00
# Haupt-Entry-Point (Laravel)
2025-10-23 12:22:27 +02:00
location / {
try_files $uri $uri/ /index.php?$query_string;
}
2025-10-23 13:05:17 +02:00
# PHP-FPM Verarbeitung
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_read_timeout 60s;
fastcgi_buffering on;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
2025-10-24 12:52:01 +02:00
# Forward the X-Forwarded-Proto header
fastcgi_param HTTPS $http_x_forwarded_proto;
2025-10-23 13:05:17 +02:00
}
2025-10-23 12:22:27 +02:00
2025-10-23 13:05:17 +02:00
# Maximale Client Upload-Größe
2025-10-23 12:22:27 +02:00
client_max_body_size 64m;
2025-10-23 13:05:17 +02:00
# Sicherheits-Header
2025-10-23 12:22:27 +02:00
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
2025-10-23 13:05:17 +02:00
# Gzip-Kompression
2025-10-24 12:52:01 +02:00
}