我尝试在本地端口80上运行vagrant。在Vagrant文件中,我尝试了以下两件事,但这些都行不通。当我在浏览器中访问localhost或127.0.0.1时,页面将加载一段时间,然后最终使用&#34重定向到端口8080;此网页不可用"错误...
config.trigger.after [:provision, :up, :reload] do
system('echo "
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
" | sudo pfctl -ef - >/dev/null 2>&1;'
)
end
config.trigger.after [:provision, :up, :reload] do
system('echo "
rdr pass on lo0 inet proto tcp from any to 127.0.0.1 port 80 -> 127.0.0.1 port 8080
" | sudo pfctl -ef - > /dev/null 2>&1;')
end
(我确实安装了vagrant-triggers插件。我在Mac 10.10.5上安装)
似乎缺少什么?