Hi, I’m hosting a demo Django application on an AWS Lightsail instance. It was working correctly at the original assigned IP address, but the documentation recommended adding a static IP address, which I did (it’s 188.8.131.52). I can SSH into the instance using that IP, and the ipv4 firewall rules are set to allow HTTP on port 80 and HTTPS on 443.
But since making that change, I keep getting 400 Bad Request when I try to access the site. I first tried setting ALLOWED_HOSTS=[‘184.108.40.206’]. When that didn’t work, I tried temporarily setting ALLOWED_HOSTS=[‘*’] and DEBUG=True, but still am getting 400 Bad Request.
I can still use manage.py runserver to run the app while in an SSH session and access the app in a second SSH session using lynx http://127.0.0.1:8000. When I do that, I see the expected ‘hello world’ http response.
I’d appreciate any help in how to troubleshoot this. I think AWS support will just give me a link to the same documentation I’ve been following.