Support » Plugin: NinjaFirewall (WP Edition) - Advanced Security » Stuck with first configuration step

  • Resolved André

    (@tichypress)


    Hi,

    I’m using NinjaFirewall (WP Edition) on several installations, never experienced this before: The first configuration step always jumps back to “Select your HTTP server and your PHP server API (SAPI)”. Tried all combinations on Apache Webserver.

    wp-check.php says (domain changed to thiscase.tld):

    NinjaFirewall (WP edition) troubleshooter
    HTTP server : Apache/2.4.18 (Ubuntu)
    PHP version : 7.0.22-0ubuntu0.16.04.1
    PHP SAPI : APACHE2HANDLER

    auto_prepend_file : none
    wp-config.php : found in /var/www/thiscase.tld/wp-config.php
    NinjaFirewall detection : NinjaFirewall is not loaded

    Loaded INI file : /etc/php/7.0/apache2/php.ini
    user_ini.filename : .user.ini
    user_ini.cache_ttl : 300 seconds
    User PHP INI : none found

    DOCUMENT_ROOT : /var/www/thiscase.tld/
    ABSPATH : /var/www/thiscase.tld/
    WordPress version : 4.8.2
    WP_CONTENT_DIR : /var/www/thiscase.tld/wp-content
    Plugins directory : /var/www/thiscase.tld/wp-content/plugins
    User Role : Administrator
    Log dir permissions : /var/www/thiscase.tld/wp-content/nfwlog dir is writable
    Cache dir permissions : /var/www/thiscase.tld/wp-content/nfwlog/cache dir is writable

    NinjaFirewall (WP edition) troubleshooter v1.6

    Unfortunately no PHP error is thrown to investigate further. Any ideas?

    Thanks,
    André

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi,

    You are running PHP as an Apache module (APACHE2HANDLER) therefore you should select “Apache + PHP module” and the firewall’s directive will be written to your .htaccess.
    If that does not work, make sure that the AllowOverride directive is set in your main Apache configuration, otherwise it will ignore the .htaccess file:

    <Directory /path/to/your/website/folder>  
       AllowOverride All
    </Directory>
    

    Apache must be restarted after making changes to its main configuration file.

    Thanks for your fast reply, I checked but exactly that was the case.

    After reading some more documentation I dared to write manually to .htaccess:

    # BEGIN NinjaFirewall
    <IfModule mod_php7.c>
       php_value auto_prepend_file /var/www/thiscase.tld/wp-content/nfwlog/ninjafirewall.php
    </IfModule>
    # END NinjaFirewall

    .. worked!

    Folder and .htaccess is writeable to webserver user, but for some reason the plugin couldn’t write that? Any idea, why this may occure?

    Plugin Author nintechnet

    (@nintechnet)

    I have no idea as to why you faced that issue, the firewall should return an error in the file is not writable. I’ll check if we can improve the installer and make it more verbose.

    Ok, thanks a lot for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Stuck with first configuration step’ is closed to new replies.