• The APS Catalog has been deprecated and removed from all Plesk Obsidian versions.
    Applications already installed from the APS Catalog will continue working. However, Plesk will no longer provide support for APS applications.
  • Please be aware: with the Plesk Obsidian 18.0.78 release, the support for the ngx_pagespeed.so module will be deprecated and removed from the sw-nginx package.

.htaccess php_flag engine off

grumpydev

New Pleskian
I am attempting to disable php in a directory and it is not working. Can anyone please show me the error of my ways as this "should work"!?

.htaccess
php_flag engine off
deny from all
<Files ~ "^[a-zA-Z0-9_-]+\.(gif|jpe?g|png|xls|docx?|pdf)$">
order deny,allow
allow from all
</Files>

This is plesk 11.09 #28 on Centos 5.8
nginx reverse proxy to apache running mod_php (doesn't work with FastCGI either)

Any help is greatly appreciated as I have tried everything to get this to work. The basic idea is that I have a directory where uploaded files are copied (yes, i know i should be performing better validation, filtering - this is coming, in the mean time i need to ensure no PHP can be served).
 
OK - so i figured this out. The domain i was trying to utilize this on was on a customized plan. After i clicked "unlock and sync" it got the necessary changes.
 
Ok - so, it did correctly stop executing the .php file extension, however it did not turn off the php engine so that issue still remains.

Any ideas why

php_flag engine off

does not work?

UPDATE:
I think the issue might be because of suexec
 
Last edited:
Back
Top