Something very terrible happened to one of the sites I work on yesterday.
I was called that the site was redirecting to https://www.loyaltycommunication.com. The domain was managed on AWS Route53 and calls are forwarded to an ALB which pushes the request to some EC2 instances.
When I traced the request I realized that the request rightly got to the EC2 instances but NGINX on the instances is the one throwing 302 and redirect to the website.
After trying everything I decide to restart all NGINX, and that was it, the issue got solved. But how am I going to assure stakeholders that this will not repeat again since I don't know what kind of attack this is? Can anyone help shed light on this?
EDITED
The site is cached on AWS CloudFront, the NGINX configuration is very long posting it here will be an abuse of the internet.
Moreover, there is nothing wrong with configuration since I just issued service Nginx restart
and everything started working fine again.