If you see an error on your screen with a 5xx error, the issue might be solved differently based on your configuration or setup.
First, we need to check what kind of error code you see.
Error 502
If you see this screen when you try to access a domain that is behind CloudFlare while BitNinja is running with the WAF module enabled and the Trusted proxy module enabled.
- Issue
bitninjacli --module=SslTerminating --regenerate
- Wait for a minute to make sure the command went trough
- Run
bitninjacli --module=SslTerminating --reload
Then all domains that are behind Cloudflare should be reachable from now.
504 Gateway Time-out
If you see a time-out error 504 from Nginx, like in this screenshot, we need to increase the timeout threshold. We have to increase the values of the “Proxy read timeout” and “HAProxy timeout”.
How to change the value of Proxy read timeout?
- Open the Configuration menu on your BitNinja dashboard.
- Select the setting level on the left side. (server-level, server group-level, account-level)
- Select the WAF 2.0 module on the left side
- Scroll down and select the “Advanced settings” menu at the bottom.
- Change the “Proxy read timeout” value to 300
- Click on the “Apply” button at the top of the screen
How to change the value of HAProxy timeout?
- Open the Configuration menu on your BitNinja dashboard.
- Select the setting level on the left side. (server-level, server group-level, account-level)
- Select the Advanced module on the left side
- Scroll down and select the “Protection on HTTPS” menu at the bottom.
- Under “Set up HAProxy timeout in seconds” you have to click the “+Add new” button and type in the configuration’s name and the value.
For example: connect 500s then press “Add”
Of course, the values can be higher according to your preference. We suggest adjusting the values of the other configurations, such as client and server, as well. - Don’t forget to click on the “Apply” button at the top of the screen
Once you have configured all the options mentioned earlier, the end result should resemble this:
If You experience any other errors please don’t hesitate to contact us via Chat from the Dashboard or by sending an email to info@bitninja.io.
You can also send us a ticket here.
You can also send us a ticket here.