Sucuri and 502 Bad Gateway for Dns issue?
Hi guys,
I have a strange problem, on a working domain and hosting we changed the dns setting pointing it to the sucuri waf ip and from that moment we are getting 502 bad gateway from nginx.
I think the problem is related to the nginx dns query that return a different ip respect the cpanel one (the sucuri ip), could be?
Any experience on it or what fix it?
Thank you
Regards
Marco
-
Marco, Is the 502 bad gateway being thrown by Sucuri, or are you saying you have Nginx installed on your server? 0 -
Hi, Yes, the error was coming out from my server that is running a classical setup nginx+apache. After many hours looking on google i have found the reason of this, the resolver option under the nginx configuration was performing a dns query to each domain before to pass the request to apache trying to connect to the sucuriIP:8080 that's the reason of the 502 error. The workaround has been to replace the google dns 8.8.8.8 used with the local bind server. Probably there is a better way to do this, but it's working fine. Thank you M. 0 -
Hello, I'm happy to see you were able to address the issue. Thank you for updating us with the outcome. 0
Please sign in to leave a comment.
Comments
3 comments