Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
How to disable PHP Execution in certain directories
I’m currently on an Ubuntu 16.04 VPS with Apache2, trying to run a small public file host. However, I have noticed that PHP execution is enabled within the files directory, allowing people to run Shell programs from said PHP files. I have tried adding “php_flag engine off” within my .htaccess file among other fixes, but nothing seems to work. I’m not sure what to do.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×