【发布时间】:2014-09-18 22:28:39
【问题描述】:
我尝试在 mac os 10.9.4 上安装 Vagrant 和 Ubuntu,以按照@fideloper 的以下重要说明制作本地开发服务器:Vagrant and Apache。
Vagrantfile 包含:
config.vm.box = "ubuntu/trusty64"
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.synced_folder ".", "/var/www/html"
evreything 在此过程中运行良好:安装了 Vagrant 和 virtualbox,在客户机上安装了 Apache。
来自this answer,我试过了:
- 在客户机上,
curl 'http://localhost:80'返回一个带有文件列表的 html - 在主机上,
curl -v 'http://localhost:8080'返回 同一页。
但浏览器在 localhost:8080 显示 this webpage is not available。
为什么浏览器不显示 localhost:8080?
【问题讨论】: