• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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