.htaccess: Option ExecCGI not allowed here

ASghostKI

Verified User
Joined
Oct 30, 2020
Messages
30
I'm having this issue on a WordPress site, I have Wordfence Security app and to block code execution on the wp upload folder (which is public_html/media/ in my case) it needs to add this to the upload folder .htaccess:
Code:
Options -ExecCGI

When i does this all my WordPress images gives an 500 error
Code:
[Sat Jan 02 17:22:14.975438 2021] [core:alert] [pid 29720:tid 139994442192640] [client *****] /home/myuser/domains/domain.com/private_html/media/.htaccess: Option ExecCGI not allowed here, referer: https://domain.com/

I have tried to edit the custom httpd for the domain but no luck
Here is how I edit it :

Custom HTTPD Configurations -> mydomain -> httpd.conf -> Customize
and in the first text area I put this:
Apache config:
    <Directory /home/myuser/domains/domain.com/public_html/media>
               AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,Includes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
               Options +ExecCGI
    </Directory>
 
Back
Top