location / {
try_files $uri $uri/ /index.php?$args;
add_header Access-Control-Allow-Origin *;
}
location ~ \.html$ {
default_type text/html;
add_header Content-Type text/html;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location ~* /uploads/.*\.php$ {
return 503;
}