2016-03-04 20:50

Homestead没有设置VM Web应用程序


I'm trying to start up Homestead to work on a couple websites located in the virtual machine, but they are not available, even though they were working yesterday when I configured it for the first time, and even though no error is displayed. This is the output text of the homestead up:

C:\Users\Luis>homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'laravel/homestead' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 80 => 8000 (adapter 1)
    default: 443 => 44300 (adapter 1)
    default: 3306 => 33060 (adapter 1)
    default: 5432 => 54320 (adapter 1)
    default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> 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: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
    default: /vagrant => C:/Users/Luis/AppData/Roaming/Composer/vendor/laravel/homestead
    default: /home/vagrant/Code => D:/www
    default: /home/vagrant/laravel => D:/www/laravel
    default: /home/vagrant/Code/phpmyadmin => D:/www/phpmyadmin
    default: /home/vagrant/Code/codeigniter => D:/www/codeigniter
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

As I've mentioned, it was working perfectly yesterday, but I can't access any of the web applications installed (Laravel, phpMyAdmin, Codeigniter).

And this is my homestead.yaml file:

ip: ""
memory: 2048
cpus: 1
provider: virtualbox

authorize: C:\Users\Luis\.ssh\

    - C:\Users\Luis\.ssh\id_rsa

    - map: D:\www
      to: /home/vagrant/Code
    - map:  D:\www\phpmyadmin
      to: /home/vagrant/Code/phpmyadmin
    - map:  D:\www\codeigniter
      to: /home/vagrant/Code/codeigniter
    - map:  D:\www\laravel
      to: /home/vagrant/laravel

    - map:
      to: /home/vagrant/Code/laravel/public
    - map:
      to: /home/vagrant/Code/laravel/public
    - map:
      to: /home/vagrant/Code/phpmyadmin
    - map:
      to: /home/vagrant/Code/codeigniter

    - homestead
    - codeigniter

    - key: APP_ENV
      value: local

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 93000
#       to: 9300
#     - send: 7777
#       to: 777
#       protocol: udp

Ping to doesn't work either. The host machine is Windows as you can guess.

The domains are listed within the hosts file too.

What else could I do?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答


  • doumang20060820 doumang20060820 5年前

    Try to vagrant provision your VM. Also check your Firewall and Antivirus software, try to disable it for a moment and ping again.

    点赞 评论 复制链接分享