views:

284

answers:

2

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?

+9  A: 

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
scompt.com
Or you can use 0.0.0.0:8000 to bind to the computer's external IP address whatever it is.
Daniel Roseman
cool, I didn't know you could do that
scompt.com
thank you for the information
Mert Nuhoglu
0.0.0.0:8000 binds to all interfaces, not just the external one, so it can still be accessed as localhost:8000
camh
A: 

this also does not work. Are there any other settings to be configured?

Gim