我有一个盒子配置文件使用Vagrant.现在我想将Vagrant用于另一个盒子(b2),但是它说bioiq的实例正在消耗转发的端口2222(它是).
现在,如果我用下面的配置b2,Vagrant仍然会尝试使用2222.
Vagrant.configure("2") do |config|
config.vm.box = 'precise32'
config.vm.box_url = 'http://files.vagrantup.com/precise32.box'
config.vm.network :forwarded_port, guest: 22, host: 2323
# Neither of these fix my problem
# config.vm.network :private_network, type: :dhcp
# config.vm.network :private_network, ip: "10.0.0.200"
end
Run Code Online (Sandbox Code Playgroud)
我尝试了其他SO问题的各种方法来设置:forwarded_port(见这里和这里).我也试过这个谷歌集团的帖子,但没有用.我一直收到这条消息.
Vagrant cannot forward the specified ports on this VM, since they
would collide with some other application that is already listening
on these ports. The forwarded port to 2222 is already in use
on the host …Run Code Online (Sandbox Code Playgroud) 所以我有一个NGINX服务器在Vagrant盒子上用uwsgi监听8080端口.config.vm.forward_port 8080,80对我不起作用.我知道建议在高于2000的端口上转发,但我需要80.这有什么问题吗?
我正在使用vagrant进行开发,但我需要在端口80上使用我的域名从外部进行一些测试.感谢您的帮助.