Nginx server block
On a VPS running nginx and PHP-FPM, block direct access to internal folders and enable immutable caching for static assets:
server {
listen 443 ssl;
server_name yourdomain.com;
root /var/www/yourdomain.com;
index index.php;
location ^~ /data/ { deny all; }
location ^~ /core/ { deny all; }
location ~* ^/assets/.+\.(css|js|svg|webp|woff2)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
}
}
Pre-launch verification
Confirm HTTPS redirects, zero horizontal overflow at 360px, contrast in both light and dark modes, and valid /sitemap.xml output.