Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
Cannot access my Django page hosted on AWS EC2 instance

I cannot access my Django app on an EC2 instance (host2) in my browser by typing its public DNS name with port number: ec2-public-dns-of-this-instance.compute-1.amazonaws.com:8000

  1. I'm using the same Security Group that my other EC2 instance (host1) is using which is working just fine (my other Django app hosted on this instance works perfectly fine), with HTTP/TCP open on 0.0.0.0/0 on port 8000
  2. I started my Django project this way: ./manage.py runserver 0.0.0.0:8000
  3. I've added hosts into my ALLOWED_HOSTS file which has these now: ALLOWED_HOSTS = ['*', '127.0.0.1', 'ec2-public-dns-of-this-instance.compute-1.amazonaws.com', '0.0.0.0', 'localhost']
  4. I was able to curl localhost:8000 which returned me 200 and Django default HTML page when I'm ssh'ed into this instance.
  5. I was able to curl ec2-public-dns-of-this-instance.compute-1.amazonaws.com:8000 which also returned me 200 and Django default HTML page when I'm ssh'ed into this instance.
  6. both host1 and host2 are using the exactly the same subnet, VPC, SG, AMI, in the same AZ.
  7. both host1 and host2 are running on AMI Ubuntu 18.04 LTS

Any ideas how to fix this would be greatly appreciated!

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Interestingly, it started working three hours later. I didn't change anything and all things remain the same as I described above. I have no clue why this is the case...

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!