Troubleshooting
This section covers common issues and their solutions when using nginx waf.
Installation Issues
Database Connection Failed
Problem: nginx waf cannot connect to the database.
Solution:
- Check that your database server is running
- Verify the database connection settings in your
.env
file - Ensure the database user has the necessary permissions
- Check if the database exists
Domain Issues
Domain Not Working
Problem: A newly created domain is not accessible.
Solution:
- Check that the DNS record for the domain is pointing to your server
- Verify that Nginx configuration was generated correctly
- Reload Nginx configuration
bash
# Check Nginx configuration
sudo nginx -t
# Reload Nginx
sudo systemctl reload nginx
1
2
3
4
5
2
3
4
5
SSL Certificate Not Issued
Problem: Let's Encrypt certificate cannot be issued.
Solution:
- Ensure the domain is pointing to your server
- Check that port 80 is accessible from the internet
- Verify that Let's Encrypt can reach the validation file
ModSecurity Issues
ModSecurity Not Working
Problem: ModSecurity rules are not being applied.
Solution:
- Verify that ModSecurity is installed and enabled
- Check that the ModSecurity configuration is correct
- Ensure the rule set is properly configured
False Positives
Problem: Legitimate requests are being blocked by ModSecurity.
Solution:
- Review the ModSecurity logs to identify the rule causing the issue
- Create exclusions for specific rules or endpoints
- Consider lowering the paranoia level