2016-01-09 50 views
0

我使用Laravel 5.2的流浪/家園組合,我試圖對服務器進行HTTP調用,但一些東西壞了,但我不知道爲什麼,我一直在405錯誤的網關錯誤,並有人建議我只是創建一個新的流浪箱。流浪的錯誤:我可以ssh,但nginx給我錯誤

因此,我去了我的VirtualBox管理器,並刪除了我的家園箱/刪除所有文件,然後運行vagrant創建一個新的,我能夠ssh很好,但現在當我嘗試進行HTTP調用,即在郵差,我得到:

<html> 

    <head> 
     <title>502 Bad Gateway</title> 
    </head> 

    <body bgcolor="white"> 

     <center> 
      <h1>502 Bad Gateway</h1> 
     </center> 

     <hr> 
     <center>nginx/1.9.7</center> 

    </body> 

</html> 

<!-- a padding to disable MSIE and Chrome friendly error page --> 

<!-- a padding to disable MSIE and Chrome friendly error page --> 

當運行流浪漢,我得到這個錯誤(看最後一行):

[email protected] MINGW64 ~/Homestead (master) $ vagrant up Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'laravel/homestead'... 
==> default: Matching MAC address for NAT networking... 
==> default: Checking if box 'laravel/homestead' is up to date... 
==> default: Setting the name of the VM: homestead 
==> 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: 127.0.0.1:2222 
    default: SSH username: vagrant 
    default: SSH auth method: private key 
    default: Warning: Connection timeout. Retrying... 
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace 
    default: this with a newly generated keypair for better security. 
    default: 
    default: Inserting generated public key within guest... 
    default: Removing insecure key from the guest if it's present... 
    default: Key inserted! Disconnecting and reconnecting using new SSH key... 
==> 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/Lansana/Homestead 
    default: /home/vagrant/Sites => C:/Users/Lansana/Homestead/Projects 
==> default: Running provisioner: file... 
==> default: Running provisioner: shell... 
    default: Running: inline script 
==> default: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC4q2BHIAHJ/yUc9zwJVCUbtbPe5xPJmbsbUJmtjldEnaIZ00tG/memsDHbOlGsbTxRU2QgKmrKSu7Iz8r+FglDbXLzbrg0O9rrQWi9FCpl8J630o1/fz3vejVIslcnuRBtiW/UUjYTZ5vsU2E/aMmxJFA31IzWslmQKHzOW+2XHyQ3e8QQBI7owA4QpVHtki0g0xlISA+H7kgG90NY0uEF+t4GK0KY/CN2GzxMFCAxtXLa2M8uGimySImsPBZByMNuLsdiok8W8vLWtDr9qvXhQkXOpxSTUflfCiJQmOke3hJpjWGPCcaVg9gPmr3wH9GUKnGQJ6SPQlslMI+Mekr/ [email protected] 
==> default: Running provisioner: shell... 
    default: Running: inline script 
==> default: Running provisioner: shell... 
    default: Running: C:/Users/Lansana/AppData/Local/Temp/vagrant-shell20160109-5024-pucyip.sh 
==> default: Running provisioner: shell... 
    default: Running: C:/Users/Lansana/AppData/Local/Temp/vagrant-shell20160109-5024-1dw603v.sh 
==> default: nginx stop/waiting 
==> default: nginx start/running, process 1943 
==> default: php5-fpm: unrecognized service The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong. 

任何人都知道是怎麼回事錯在這裏?

回答

0

試着做以下幾點:

$ composer remove laravel/homestead 
$ composer clear-cache 
$ composer require laravel/homestead 
$ vagrant destroy && vagrant up 

出於某種原因,做一個composer update laravel/homestead沒能搶到最新版本的宅基地文件(我認爲這事做使用"^3.0"composer.json用,和沒不認爲3.0.1需要更新或什麼),我注意到homestead.rb不是當前版本。