I use the Geodjango roaming block , and port forwarding does not work for me.
In the field, I ran:
python manage.py runserver 0.0.0.0:8000
But http://localhost:8000
, and http://localhost:4567
the two do not find anything on the host machine.
The Vagrant field curl -v 'http://localhost:8000/'
displays the usual:
<h2>Congratulations on your first Django-powered page.</h2>
which says that Django is working fine. But on the main machine, when you try curl -v 'http://localhost:8000/'
, the following output is displayed:
curl: (7) Failed connect to localhost:8000; Connection refused
My Vagrantfile has the following port forwarding settings:
config.vm.forward_port 8000, 4567
Disabling the Mac firewall does not help and stops Apache. I tried running lsof -i :8000
on the host machine and there is no way out, so I believe that nothing is using the port.
Can anyone suggest something?