Support » Plugin: Wordfence Security - Firewall, Malware Scan, and Login Security » On same server “auto_prepend_file” present and absent

  • Resolved danjde


    Hi Devs and thanks for yout wonderful plugin!
    I’ve just setup two different domains on a Debian VPS, Apache.
    On the first domain installing Wordfence all is fine, firewall setup too.
    On the second one domain, seems impossible to setup firewall functionality:

    The changes have not yet taken effect. If you are using LiteSpeed or IIS as your web server or CGI/FastCGI interface, you may need to wait a few minutes for the changes to take effect since the configuration files are sometimes cached. You also may need to select a different server configuration in order to complete this step, but wait for a few minutes before trying. You can try refreshing this page

    So looking for the issue, I’ve found a previous your support around the same question

    So, looking into “Other Tests section” and again “Click to view your system’s configuration in a new window“ I can see that for the first one domain the variable “auto_prepend_file” is correctly valorized, but for the second one domain the same variable isn’t valorized, simply blank the value.

    What could meant this behavior?
    And eventually could be depend from a Wordfence bug or a misconfigured web server setup?

    Many thanks!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • WFGerroald


    Hey @danjde,

    Have you had a chance to try the manual configuration for the second site?

    If not, can you please give this a try and let me know how it goes?



    Thread Starter danjde


    Hi @wfgerald and thanks for your help!
    Yes I could create a specific “php.ini” file to be used only for this domain.
    But this increases the complexity of managing the machine.

    Is there a way to parameterise within the general “php.ini” the

    "auto_prepend_file ="

    value to search for the


    file at the root of each “virtual domain”?

    Thank you!


    Thread Starter danjde


    Anyway, on my “.htaccess” the auto_prepend_file seems valorized:

    # Wordfence WAF
    <IfModule mod_php5.c>
            php_value auto_prepend_file '/var/www/'
    <IfModule mod_php7.c>
            php_value auto_prepend_file '/var/www/'
    <Files ".user.ini">
    <IfModule mod_authz_core.c>
            Require all denied
    <IfModule !mod_authz_core.c>
            Order deny,allow
            Deny from all
    Thread Starter danjde


    I did bullshit:
    Copying the virtualhost configuration files I kept the parameter relative to the path of the previous “config”

    Where “” it had to be instead “”

    <Directory /var/www/>
                     Options Indexes FollowSymLinks
                     AllowOverride All
                     Require all granted

    Thanks and sorry 😐

    • This reply was modified 4 years ago by danjde.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘On same server “auto_prepend_file” present and absent’ is closed to new replies.