Hello I have a VPS, php5 runs as apache mod, for security I want disable php excute on a folder and its sub folders ??? how can I do ? thanks for your time ! HN
don think you can do that, but you prevent access to any .php file using simple deny rules in htaccess
Try to use RemoveHandler (or RemoveType) in .htaccess (http://httpd.apache.org/docs/1.3/mod/mod_mime.html#removehandler)
Are you trying to disable php exec(), or are you trying to disable php from running on a directory? exec() can be disabled directly in httpd.conf, or in .htaccess. Php can be disabled using htaccess in the specific directory as wmtips suggested.
some folders need to chmod 777 for users upload images, mp3 , 777 is not secure ??? so I want any php file can not run from these folders . I am newbie thanks
Try chmod 666 or 776 for any of those folders. Test to make sure it works, but this should remove the ability to execute from all the files in that directory.