Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (12.9k points)

I am new to EC2 and web development. Currently I have a Linux EC2 instance running, and have installed Django. I am creating a test project before I start on my real project and tried running a Django test server.

This is my output in the shell:

python manage.py runserver ec2-###-##-##-##.compute-1.amazonaws.com:8000

Validating models...

0 errors found

Django version 1.3, using settings 'testsite.settings'

Development server is running at http://ec2-###-##-##-##.compute-1.amazonaws.com:8000/

Quit the server with CONTROL-C.

To test that it is wroking I have tried visiting: ec2-###-##-##-##.compute-1.amazonaws.com:8000 but I always get a "Cannot connect" message from my browser.

Whenever I do this lcoally on my computer however I do successfully get to the DJango development home page at 127.0.0.1:8000. Could someone help me figure out what I am doing wrong / might be missing when I am doing this on my EC2 instance as opposed to my own laptop?

1 Answer

0 votes
by (18.2k points)

Check if you have port 8000 open on the firewall. Go to the security group of your instance(its probably the default one if you haven't created a specific security group for your instance) and check the rules. The port 8000 will probably not be listed there.

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 11, 2019 in AWS by yuvraj (19.1k points)

Browse Categories

...