first commit

This commit is contained in:
Giuseppe Naponiello
2026-06-14 19:01:02 +02:00
commit 36bcc9a842
98 changed files with 26936 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
server {
listen 8000;
server_name _;
root /var/www/html/public;
index index.php;
# Gestione SPA/Laravel: tutto passa per index.php
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# Passa le richieste PHP a php-fpm locale
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
# Timeout generosi per operazioni Laravel pesanti (es. import, export)
fastcgi_read_timeout 300;
fastcgi_connect_timeout 300;
}
# Blocca accesso a file sensibili
location ~ /\. {
deny all;
}
location ~ /\.env {
deny all;
}
# Cache statica per asset compilati
location ~* \.(jpg|jpeg|png|gif|ico|css|js|woff2)$ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
# Log
access_log /dev/stdout;
error_log /dev/stderr warn;
}