Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @swedeman,

    It isn’t possible to use any kind of variable substitution for this.

    You will need to find a way to set the auto_prepend_file PHP value for each WordPress root directory.
    This could be done through the .user.ini file on the server or through a .htaccess file for each directory.

    Thread Starter swedeman

    (@swedeman)

    Thanks @wfyann for the response.

    Did find a solution by consulting with cPanel tech support although it did require a fair amount of configuration.

    Perhaps as WF continues to evolve and the documentation becomes more detailed, these types of multi-domain requirements will be addressed.

    Hi @swedeman,

    Thanks for letting us know. I’m glad you found a way to implement this.

    And in case you have a link to a resource from cPAnel, feel free to share ??

    Thread Starter swedeman

    (@swedeman)

    Don’t have a link to cPanel docs as this was accomplished after having submitted a support ticket. Have included the steps below in case it helps someone else or WF wants to add to its documentation.

    As @wfyann mentioned – “It isn’t possible to use any kind of variable substitution for this” to add multiple domains in one shot. While potentially time consuming, after adding the directive to all DOMAIN.php-fpm.yaml files the implementation went smoothly.

    For a single account, add the following directive to the cPanel userdata file that keeps some of the basic settings for the domain. This would be located at /var/cpanel/userdata/USERNAME/DOMAIN.php-fpm.yaml
    -=-=-=-=-=-
    php_admin_value[auto_prepend_file]: /path/to/file
    -=-=-=-=-=-
    Once this is added, rebuild the configuration files ( /scripts/php_fpm_config –rebuild ) and restart both Apache and the PHP-FPM services ( /scripts/restartsrv_apache_php_fpm; /scripts/restartsrv_apache ) Altering the PHP-FPM settings via WHM or cPanel would overwrite this file and remove the custom content. This should be preserved through other configuration rebuilds.

    Hi @swedeman,

    Thanks a lot for sharing this! It will definitely benefit other users.

    Also we’ll review this information to see if/how we can include it in our documentation.

    I have the same issue, and it’s taken me sometime to find that having php-fpm enabled caused the warning message ‘To make your site as secure as possible, take a moment to optimize the Wordfence Web Application Firewall:’.

    I don’t have the technical expertise to fix this myself so should I:
    1) Disable php-fpm and lose the benefits.
    2) Keep php-fpm enabled and ignore the Wordfence warning message, if so what protection will this compromise?

    Will this issue be resolved in a future update of Wordfence?
    Thanks

    Hi @jdtravel,

    I’m not sure you’re describing the exact same issue.

    As per the WordPress forum guidelines, could you please create a new topic so we can further assist you?

    Hi @wfyann
    Apologies, my technical knowledge is limited on this issue. I’ve therefore disabled php-fpm in order to remove the Wordfence warning message, and I’ll create a new topic to try and properly resolve the problem.
    Thanks, John

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘PHP-FPM and WF on cPanel servers’ is closed to new replies.