Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Python Development Server from External IP

I am learning Django and have deployed apps on my iMac locally. I want to show the apps from external IPs over the internet. I did add an exception to the firewall for port 8000, and ran the python dev server over 8000. Able to access at localhost, but not over the net. However, when I tried XAMPP (Apache) over the same port 8000, I can access the site externally, despite needing to change the httpd-xampp.conf file. Is there a similar file for the python server? How can I access the dev server from external IP's?

Environment: Mac OSX 10.5.8, Python 2.5, Django 1.2.5

Thanks in advance!

like image 584
tomato Avatar asked Feb 14 '11 21:02

tomato


1 Answers

python manage.py runserver 0.0.0.0:8000 

This will make it listen to any address. Quite useful when you want to develop over ssh from a machine that you cannot install stuff on.

like image 183
Uku Loskit Avatar answered Sep 30 '22 19:09

Uku Loskit