2

When I run Django server using this,

python manage.py runserver ip-addr:8000

I can see the server is running in the terminal. But when I open the browser, the This site can't be reached message is displayed. There is no error I see in the terminal or the console.

Also, everything works perfectly fine with 127.0.0.1 and 0.0.0.0 but not with my ip-addr.

How can I run or know that if there is something wrong or any problem?

allexiusw
  • 1,533
  • 2
  • 16
  • 23
Malav Mevada
  • 178
  • 11
  • Does this answer your question? [manage.py runserver](https://stackoverflow.com/questions/5768797/manage-py-runserver) – allexiusw Aug 13 '21 at 14:39
  • Have you set your IP in ALLOWED_HOSTS? – michjnich Aug 13 '21 at 14:40
  • By ip-addr, do you mean your public ip address? And why do you want to run it with your public IP address? Is it because you want it to be accessible by whole world? – Cagatay Barin Aug 13 '21 at 14:47
  • sometimes firewall blocks requests to your server on a specific port . Can you open the port and try again? make sure to close it after your tests are done. – Mojtaba Aug 13 '21 at 17:03
  • I'm trying to connect Django (API) to react native which works well on the web browser but it doesn't work when I use it on the phone. – Malav Mevada Aug 16 '21 at 16:40
  • Yes, I have added all the IP in ALLLOWED_HOSTS – Malav Mevada Aug 16 '21 at 16:41

0 Answers0