NinjaFirewall (WP Edition)
[resolved] Nginx instructions (3 posts)

  1. athalas
    Posted 3 years ago #


    Where would we be able to find the installation instructions when running under Nginx?



  2. nintechnet
    Plugin Author

    Posted 3 years ago #


    You will need to:

    1) copy the PHP INI instructions to a .user.ini located in your WordPress main folder (unless you setup PHP to use another INI name, e.g. php.ini, php5.ini etc).

    2) because nginx does not support .htaccess, copy the .htaccess PHPRC line and add it to your site configuration. Assuming you are using PHP-FPM, you should have something similar too this:

    server {
       listen         80;
       server_name    yourserver.com;
       location ~ \.php$ {
          try_files $uri =404;
          fastcgi_pass   unix:/tmp/php-fpm.sock;
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          include        fastcgi_params;
          # Add NinjaFirewall PHPRC here :
          fastcgi_param PHPRC /full/path/to/your/.user.ini

    Test your nginx config to ensure the syntax is OK:
    nginx -t
    Then restart nginx.

    You may need to restart PHP-FPM too.

  3. athalas
    Posted 3 years ago #

    Thanks for the prompt reply. I've added my side and appears to be working.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • NinjaFirewall (WP Edition)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic