How to make php non executable file on my all C panel.
Hello Team
I want to make php as non executable file in my All C panel accounts.
It's working in Plane server's like Centos/Ubuntu without C panel.
Trying to add something like this
php_flag engine off
# other options
under /uploads directory php file should not execute, This works in normal server's other than C panel.
If i add this code to my C panel virtual host under /etc/apache2/httpd.conf.
After adding this code in My Cpanel, If i restart my httpd, it will not restart. Its giving error like "invalid command 'php_flag' perhaps misspelled"
Please help me to make php non executable file under particular directory.
Thanks in Advance. Awaiting for your reply.
-
Hello, You should never make modifications to the cPanel VirtualHosts directly in the apache configuration, they will not be preserved after restart. You can make these modifications using the include editor. Documentation on how to use this can be found here: Modify Apache Virtual Hosts with Include Files | cPanel & WHM Documentation You'd want to put these directives inside an IfModule as instructed here: PHP: How to change configuration settings - Manual 0 -
Thanks for your reply. I am not able to see either one of the following on my server. - With SSL
- /etc/apache2/conf.d/userdata/ssl/2_4/includename.conf
- /etc/apache2/conf.d/userdata/ssl/includename.conf
- Without SSL
- /etc/apache2/conf.d/userdata/std/2_4/includename.conf
- /etc/apache2/conf.d/userdata/std/includename.conf
- With and without SSL - /etc/apache2/conf.d/userdata/includename.conf
0 - With SSL
-
I am not able to see either one of the following on my server.
You would need to create them, they do not exist by default. This is noted in the documentation as well: [QUOTE]You must create the directories and the include files for this type of configuration. For information on the directives that you can add to the virtual hosts in your Apache configuration, read .0
Please sign in to leave a comment.
Comments
3 comments