Skip to main content
Skip to footer
How to setup NinjaFirewall Full WAF for RunCloud OLS
BlogUncategorized
Step 1: Get NinjaFirewall Full WAF details
- Log in to WordPress
- Go to NinjaFirewall
- Hit the button ‘Activate Full WAF‘
- Select the Openlitespeed configuration and take note of the auto_prepend_file rule you have to add to your server. This will look like this:
php_value auto_prepend_file "/home/[user]/webapps/[application-name]/wp-content/nfwlog/ninjafirewall.php"
Step 2: Configuration in RunCloud
- Log in to RunCloud
- Browse to your application in RunCloud
- Go to ‘LiteSpeed Config‘
- In ‘Config Content’ look for the rule that looks like
env PHP_LSAPI_CHILDREN=35
- Make a copy of this rule underneath and replace
PHP_LSAPI_CHILDREN=35
for LSPHP_ENABLE_USER_INI=on
Step 3: Configuration in your server
- Connect to your server using SFTP (for example using Cyberduck)
- Go to the following folder
/home/[user]/lsphp/[application-name]
- Create a new file named
.user.ini
- Add the NinjaFirewall Full WAF configuration like this to the .user.ini file
auto_prepend_file = '/home/[user]/webapps/[application-name]/wp-content/nfwlog/ninjafirewall.php'
Step 4: Reload PHP settings in RunCloud
- Go back to RunCloud
- Go to the ‘Settings’ of your Web Application
- Find the ‘PHP Settings’ section and hit the button ‘Update PHP Settings‘
Step 5: Check if Full WAF is active for NinjaFirewall
- Go back to WordPress
- Go to NinjaFirewall and look if the mode has changed to Full WAF mode
Question, comment or an idea?
Shoot me an email!
You can reach me on
[email protected]