# Exemple nginx + PHP-FPM — la racine du site est le dossier public/
server {
    listen 443 ssl http2;
    server_name www.toutsurmonprenom.fr;
    root /var/www/prenoms/public;
    index index.php;

    gzip on;
    gzip_types text/css application/javascript application/json application/xml image/svg+xml text/plain;

    location /assets/ { expires 1y; access_log off; }
    location ~* \.(png|ico|svg|webmanifest)$ { try_files $uri /index.php?$query_string; expires 30d; }
    location = /_router.php { return 404; }

    location / { try_files $uri /index.php?$query_string; }
    location ~ \.php$ {
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root/index.php;
        fastcgi_pass unix:/run/php/php8.4-fpm.sock;
    }
}
server { listen 80; server_name toutsurmonprenom.fr www.toutsurmonprenom.fr; return 301 https://www.toutsurmonprenom.fr$request_uri; }
server { listen 443 ssl; server_name toutsurmonprenom.fr; return 301 https://www.toutsurmonprenom.fr$request_uri; }
