server { listen 80 default_server; listen [::]:80 default_server; server_name _; root /var/www/html; index index.php; location ~ /\. { deny all; } location ~* ^.+\.(svg|svgz|eot|otf|woff|ttf|jpg|jpeg|gif|png|ico|txt)$ { expires max; access_log off; log_not_found off; } location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include fastcgi_params; fastcgi_index index.php; fastcgi_pass unix:/run/php/php7.4-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; } }