Wordpress plugin issues + mail

User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Coquelish wrote: Wed Nov 10, 2021 8:01 am As I have multiple websites, there is a way to add this code once to all the websites ?
in /etc/php/7.4/fpm/php.ini you can find "auto_prepend_file", but every site has it's own folder path, right?

better idea is to add that value to /usr/local/vesta/data/templates/web/apache2/PHP-FPM-74.sh
because there you can put:

Code: Select all

php_admin_value[auto_prepend_file] = /home/$1/web/$2/public_html/wordfence-waf.php
Coquelish
Posts: 9
Joined: Thu Oct 21, 2021 7:38 am

myVesta wrote: Wed Nov 10, 2021 7:19 pm
Coquelish wrote: Wed Nov 10, 2021 8:01 am As I have multiple websites, there is a way to add this code once to all the websites ?
in /etc/php/7.4/fpm/php.ini you can find "auto_prepend_file", but every site has it's own folder path, right?

better idea is to add that value to /usr/local/vesta/data/templates/web/apache2/PHP-FPM-74.sh
because there you can put:

Code: Select all

php_admin_value[auto_prepend_file] = /home/$1/web/$2/public_html/wordfence-waf.php
Yes all my websites have own folder and own user in myvestacp.

My /etc/php/7.4/fpm/php.ini contains

Code: Select all

; Automatically add files before PHP document.
; http://php.net/auto-prepend-file
auto_prepend_file =

; Automatically add files after PHP document.
; http://php.net/auto-append-file
auto_append_file =
Unfortunately if I add the value as you mentionned into /usr/local/vesta/data/templates/web/apache2/PHP-FPM-74.sh the plugin does not work anymore and show again "auto prepend active > no" in diagnostic tools :( Is this due to the fact that I am now using hosting-legacy as proxy template for each websites ?


What about to modify the default server settings to allow each user to set directives in user.ini file? If possible, this solution would be simpler... currently it ignores .user.ini
User avatar
myVesta
Site Admin
Posts: 928
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

Modification of PHP-FPM-74.sh will not affect domains that are already added to your server.
It will affect only new domains that will be added in future.

For old domains you must manually change their pool.d conf files.
Post Reply