Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django 0.0.0.0:80; can't access remotely

Tags:

django

I'm trying to access my Django server from another computer on the same network. I've set up my server and can view everything correctly usingpython manage.py runserver and going to http://127.0.0.1:8000 but when I try to use python manage.py runserver 0.0.0.0:80, I can't view my Django page from another computer. The computer hosting the Django server has intranet IP 192.168.1.146. On my secondary computer, I fire up a browser and try to access http://192.168.1.146:80 to no avail. I've also forwarded port 80 (and I've tried 8000 as well) also to no avail :(. HELP!

like image 494
isyi Avatar asked May 25 '10 04:05

isyi


2 Answers

I had the same question on a Windows computer, and started the Django server with python manage.py runserver 192.168.1.146:80, instead of the 0.0.0.0. (I used a different IP address of course).

After that, a Windows Firewall dialog popped up and asked if I should unblock the port (yes). Other computers in the LAN could then access the Django server using 192.168.1.146:80.

like image 71
Karl Wenzel Avatar answered Sep 21 '22 21:09

Karl Wenzel


In order for it to work for me, I ran sudo python manage.py runserver 0.0.0.0:80 in terminal (Mac OS X 10.8.2), and then in your ipad (or iphone) browser, go to http://[your ip address]/. I didn't have to do this: Testing Django website on iphone

To find the IP address on a Mac

like image 23
Ryan Walton Avatar answered Sep 20 '22 21:09

Ryan Walton