Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access django app through ip address while accessing it through localhost

I have a django app on my local computer. I can access the application from a browser by using the url: http://localhost:8000/myapp/

But I cannot access the application by using the ip of the host computer: http://193.140.209.49:8000/myapp/ I get a 404 error.

What should I do? Any suggestions?

like image 319
Mert Nuhoglu Avatar asked Sep 29 '09 16:09

Mert Nuhoglu


1 Answers

I assume you're using the development server. If so, then you need to specifically bind to your external IP for the server to be available there. Try this command:

./manage.py runserver 193.140.209.49:8000
like image 109
Edward Dale Avatar answered Nov 17 '22 17:11

Edward Dale