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

  • Resolved danjde

    (@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)
  • Hey @danjde,

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

    https://www.wordfence.com/help/firewall/optimizing-the-firewall/#alternative-hosting-provider-setups

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

    Thanks,

    Gerroald

    Thread Starter danjde

    (@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

    "wordfence-waf.php"

    file at the root of each “virtual domain”?

    Thank you!

    Davide

    Thread Starter danjde

    (@danjde)

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

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

    (@danjde)

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

    Where “test.example.org” it had to be instead “test2.example.org”

    <Directory /var/www/test.example.org/public_html/>
                     Options Indexes FollowSymLinks
                     AllowOverride All
                     Require all granted
                    </Directory>

    Thanks and sorry 😐

    • This reply was modified 2 years, 9 months 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.