Apache - Disable script execution upload directory

For Apache:

<Directory /path/to/directory>  php_flag engine off

For Nginx :

location  /path/to/directory/ { location ~ .*.(php)?$ {   deny all; } }