Django refuses connection on AWS instance

I have a django app which is close to the default install app. In settings.py I have

DEBUG = False
ALLOWED_HOSTS = ['*']

I have added a url

server/get_something

which I can request and returns fine when I am running the server locally using

python manage.py runserver

I have installed and run my app on an AWS instance using port 7500, and I have opened that port to all addresses in the AWS security group like this:

enter image description here

However when I make my request from a remote computer (to the AWS instance) I get a "refused to connect" error. There is no relevant printed output on the django process.

It is worth noting that if I try to connect to a different port, it times out, so I think that the request is getting past AWS' firewall. But I can't work out why it isn't getting to django on the instance.

Also, I have used curl locally on the AWS instance:

curl 127.0.0.1:7500/server/get_something

And this works fine.

Вернуться на верх