Written March 1, 2013. Tagged Vagrant, Pow, OS X.
We're experimenting with Vagrant virtual machines for development.
To use your host machine browser against a virtual machine web server, Vagrant must forward some host machine port to the server's port.
So on your host machine, you may use http://localhost:8001
for app1 and http://localhost:8002
for app2.
This avoids port conflicts, but it's a bit rough.
If you have Pow installed on your OS X host machine, though, you can use its port proxying feature. Just do this:
echo 8001 > ~/.pow/app1
echo 8002 > ~/.pow/app2
You can now use http://app1.dev
instead of http://localhost:8001
, and http://app2.dev
instead of http://localhost:8002
.