Alternativa a Apache.
server {
listen 443 ssl http2;
server_name puebler.com;
root /var/www/puebler/public;
index index.php;
client_max_body_size 400M;
location ~* \.(css|js|woff2|png|jpg|jpeg|webp|svg|ico)$ { expires 30d; access_log off; try_files $uri =404; }
location ^~ /uploads/ { location ~ \.(php|phtml|html?|js|svg)$ { deny all; } try_files $uri =404; }
location = /router.php { deny all; }
location / { try_files $uri /index.php$is_args$args; }
location = /index.php {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
}
location ~ /\. { deny all; }
}Con proxy delante (Cloudflare), pon TRUST_PROXY=true en .env.