Reputation: 23
I am pretty new to Web-Development
I have Python-Django and apache2 installed on VirtualBox.The VirtualBox adapter settings are OK since i am able to visit the web pages hoisted from apache2. Now the problem is when i tried to visit the pages hoisted by django inbuilt web-server It didn't opened.
For apache2 port number is 80 and for django port number is 8000
Please help me to get through this problem
Upvotes: 1
Views: 335
Reputation: 59238
Django development web server normally binds to localhost (127.0.0.1) only, therefore you can only access it from the same machine (or VM). You can change this behavior by starting it using:
python manage.py runserver 0.0.0.0:8000
This way it will bind to every IP address (both 127.0.0.1 and whatever IP address you gave to your VM) so that you can access it from "outside".
Upvotes: 3