Vagrant 上装 了一个开发环境 做好配置了为什么 浏览器请求没有反应?

分享 knewmei ⋅ 于 3年前 ⋅ 最后回复由 knewmei 2年前 ⋅ 5435 阅读
D:\Oracle\server>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'web'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: server_default_1418176788117_2739
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 8080 is already in use
on the host machine.

To fix this, modify your current projects Vagrantfile to use another
port. Example, where '1234' would be replaced by a unique host port: :forwarded_port, guest: 80, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this
case, Vagrant was unable to. This is usually because the guest machine
is in a state which doesn't allow modifying port forwarding.

D:\Oracle\server>vagrant reload
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
    default: Adapter 3: bridged
==> default: Forwarding ports...
    default: 80 => 8080 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address:
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: Warning: Connection timeout. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => D:/Oracle/server
    default: /var/www/html => E:/www


用SSH 2222 可以进到机器中


本文章首发在 Laravel China 社区
成为第一个点赞的人吧 :bowtie:
回复数量: 6
  • Summer 站长 @

    我们不是有 Markdown 可以用吗, 一上来一堆乱七八糟的字符...

  • Summer 站长 @

    @knewmei 哈哈, 我已经把你改过来了. 还有, 评论里你贴的内容 太乱了, 我删了, 你重新贴下咯.

    你用的是最新版本的 Homestead 吗?


    Homestead 里面已经有软件了, 见这里:

    Homestead 运行的脚本可以见这里:

  • Summer 站长 @

    有可能是没有 provision 完全, 试试看:

    vagrant provision


    vagrant reload


  • Summer 站长 @

    @knewmei 运行 vagrant provision 了吗?

  • Summer 站长 @


    无法理解 不能启用 什么意思.

    运行 vagrant provision 的时候报错??

  • Summer 站长 @


    发现过几次 Homestead 里面的软件有问题, 都是因为: vagrant provision 运行不全面造成的 (报错, 断网, 下载东西错误 etc.. ).


Composer 中国全量镜像

Top 250 扩展包

Lumen 中文文档

Laravel 速查表

Laravel 中文文档

Laravel 项目开发规范

Laravel 开发环境部署

Composer 中文文档

Elasticsearch-PHP 中文文档

Lumen 中文文档

GraphQL PHP 中文文档


TDD 构建 Laravel 论坛笔记

PHP PSR 标准规范

PHP 设计模式全集

Dingo API 中文文档