Reputation: 629
I installed Django on my Ubuntu Server 14 as a development tool.
I want to access Django outside my server by using the URL http://my_server_ip:82 on any computer.
So I ran the command python manage.py runserver 0.0.0.0:82.
But when I try to connect to http://my_server_ip:82 from another computer, it doesn't work..
I also :
- allowed port 82 by using ufw allow in 82 and ufw allow out 82.
- wrote ALLOWED_HOSTS = ['*'] in settings.py
I read many and many topics dealing with this problem but it finally worked in many cases. I tried everything but nothing seems to work..
Would you have any solutions ?
Thanks !
Upvotes: 0
Views: 539
Reputation: 864
It's not a good idea to use the builtin Django webserver in a production setting. I would encourage you to check alternatives like Apache, Spawning, Gunigorn, Cherokee or so.
Please refer to the documentation http://docs.djangoproject.com/en/dev/ref/django-admin/#runserver-port-or-address-port
Upvotes: 2