[Answered ]-Making a django application running on 127.0.0.1:8000 accessible everywhere?

1πŸ‘

For accessing the django project else every where you have use the command

python manage.py runserver 0.0.0.0:8000

then You will be access it outside by giving the IP:8000

Note : the server provided by the Django is only for the development purpose only . If you want a permanent hosting you may like to use Apache or any server , where You can host your project. Hope This helps . πŸ™‚

πŸ‘€coder3521

1πŸ‘

You need assign a elastic IP address (EIP) on the aws ec2 instance, and allow the inbound traffic 0.0.0.0/0 to port 8000 from its security group.

Then you should be fine to access it from every where with EIP, such as http://54.12.23.34:8000

EIP may generate cost, if you stop the ec2 instance.

πŸ‘€BMW

0πŸ‘

You may also want to try the command:

python manage.py runserver [::]:8000

This will bind runserver to all available interfaces on your AWS VM. Please also note: runserver is really just meant for development. Running it in production is a bad idea.

πŸ‘€FlipperPA

0πŸ‘

You can use http://localtunnel.me/, it’s very very easy but you should use it only for development purposes.

0πŸ‘

Just in case, you want to run it on 80 port then you need root permissions

sudo python manage.py runserver 0.0.0.0:80
πŸ‘€hspandher

Leave a comment