I'm facing ERR_CONNECTION_TIMED_OUT while deploying django using aws elastic beanstalk.
Current status
Console shows that it's properly deployed. (shows OK status to me)
Allow inbound traffic for security group.
However, when I tried to connect instance using the url the elastic beanstalk provide, I've been always seeing ERR_CONNECTION_TIMED_OUT on chrome browser.
Things I've tried.
Checked nginx log, and there's nothing printed out. So I suspect that Load balancer didn't route request to nginx web server.
tail -f /var/log/nginx/*
Connected ec2 instance using ssh, and checked nginx running with port 80 and gunicorn running with port 8000
Could anyone please help me to find out the issue?
Thanks in advance!
Answers
Based on the comments.
The issue turned out to be due to django setting: django.middleware.security.SecurityMiddleware:
The django.middleware.security.SecurityMiddleware provides several security enhancements to the request/response cycle. Each one can be independently enabled or disabled with a setting.