How can you prevent to be hacked with a PHP file uploaded to your server?

--

Add it to your .php file to prevent any file with that extension to be executed.

nginx.conf of your server

location ~ (\.php$|myadmin) {
return 403;
}

I hope it help someone.

--

--