hello, i want to prevent people from execute php files in the files folder of drupal here my idea but its not working after restarting nginx can you correct my code please.
location ~ ^/sites/default/files/.(php)$ {
deny all;
}
location ~ .php$ {
fastcgi_split_path_info ^(.+.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000; # By all means use a different server for the fcgi processes if you ne$
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; # !! <--- Another path r$
# fastcgi_intercept_errors on;
include /etc/nginx/fastcgi.conf;
# track_uploads uploads 60s;
}