Fix vagrant port error

The way the port config code evaluated confused Vagrant. This changes
it up a bit and allows it to be reused.