WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Nginx instructions

[Resolved] Nginx instructions

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

    @nintechnet

    Hi,

    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.

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Nginx instructions’ is closed to new replies.