• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Issue Allowing some php in wp-content

VirtualCed

New Pleskian
Hello,

Sorry if this has already been asked, I don't find relevant keywords to do the search.

I'm using Thrive plugins (http://petitlien.pl/thrivepages ) and they need to run some php files that are blocked by my apache config directives

Code:
        <Directory "/var/www/vhosts/domain.com/httpdocs/wp-content">
            <FilesMatch \.php$>
                Require all denied
            </FilesMatch>
        </Directory>

as you can see here : http://screencast.com/t/bNCZyIkIx

Where can I edit this to solve my issue ?
I've comment them manually in the
/var/www/vhosts/system/domain.com/conf/httpd.conf

But I don't now if it is the best place to do it, or if it can be in the webinterface.

And also if I can only allow certain files.

Thanks for your help

Cédric
 
How did the Thrive plugin manage to place the Apache directives into the Apache configuration file on your system??? If you have manually added the code to your httpd.conf file, remove it and use it in an .htaccess file instead.

Editing /var/www/vhosts/system/domain.com/conf/httpd.conf is not a good idea, because Plesk we re-generate this file when you update the subscription or reconfigure the domain in the Plesk GUI.
 
@Peter Debik Thanks to take time to answer.
I don't want to add this code I want to remove it. Thrive didn't put it in the apache directive. It seems it's made by plesk or the WordPress Toolkit of Plesk.
What I need is to allow php in the wp-content. For security reason I'd like to allow only specific files or specific directory (/var/www/vhosts/domain.com/httpdocs/wp-content/plugins/thrive-visual-editor/shortcodes/templates/)
If I can allow it from .htaccess and overide the "Require all denied" from the httpd.conf I will be happy too.

Best regards
Cedric
 
I did not test it, but directives in .htaccess should override directives in the configuration file. So if you add the sequence to .htaccess, but change "require all denied" to "require all granted" it will probably do the trick.
 
Hmmmm

I don't now if my syntax is wrong but all the try I made give me an error 500 due to
<Directory not allowed here

:(
 
You cannot use the directory directive in an .htaccess file. Instead, omit the directory bracket and place the .htaccess file into the directory that you wish to control, e.g. /wp-content.
 
Back
Top