我一直在试图让这个到现在4小时,现在的工作,我很努力。Laravel家园流浪 - 无法看到网站 - 安装问题
我想让我的家园工作。我跟着安装向导在这里: https://laravel.com/docs/5.2/homestead
我有几个问题:
1)当我通过克隆GitHub库安装家园 - 我在安装和在src
文件夹中获得src
我的文件夹有这个:src/stubs/Homestead.yaml
。当我跟着指示我跑庆典init.sh在安装的根内,在其创建的文件夹/.homestead
3个文件after.sh
一个aliases
和Homestead.yml
文件。根据我的理解,我将修改Homestead.yml
以反映我的环境。问题是哪一个?在隐藏.homestead
文件夹中的一个或我安装Homestead的地方?
2)当我去http://site1.local:8000/
在浏览器中,我得到一个网站无法到达的错误 - 拒绝连接。当我去http://localhost:8000/
时,我得到'没有指定输入文件'。
3.)通过命令行命令宅不被识别为一个内部或外部的命令 - 它应该是什么?我读过类似问题的人应该运行命令homestead up
但它不被识别。
这里是我的Homestead.yml文件:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/LaravelProjects/projects
to: /home/vagrant/Code
sites:
- map: site1.local
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
这里是我的主机文件:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
#laravel project 1
192.168.10.10 site1.local
我已经更新了我的hosts文件。我已经尝试运行vagrant reload --provision
和vagrant destroy
和其他无用的命令。有什么建议么?
这里是运行vagrant reload --provision
==> default: Attempting graceful shutdown of VM...
==> 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 (guest) => 8000 (host) (adapter 1)
default: 443 (guest) => 44300 (host) (adapter 1)
default: 3306 (guest) => 33060 (host) (adapter 1)
default: 5432 (guest) => 54320 (host) (adapter 1)
default: 22 (guest) => 2222 (host) (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: Remote connection disconnect. Retrying...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: The guest additions on this VM do not match the installed version of
default: VirtualBox! In most cases this is fine, but in rare cases it can
default: prevent things such as shared folders from working properly. If you see
default: shared folder errors, please make sure the guest additions within the
default: virtual machine match the version of VirtualBox you have installed on
default: your host and reload your VM.
default:
default: Guest Additions Version: 5.0.20
default: VirtualBox Version: 5.1
==> default: Setting hostname...
==> default: Configuring and enabling network interfaces...
==> default: Mounting shared folders...
default: /vagrant => C:/Users/Radley.Anaya/LaravelProjects/Homestead
default: /home/vagrant/Code => C:/Users/Radley.Anaya/LaravelProjects/projects
==> default: Running provisioner: file...
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: C:/Users/RADLEY~1.ANA/AppData/Local/Temp/vagrant-shell20160801-10000-y9i8nr.sh
==> default: Running provisioner: shell...
default: Running: script: Creating Site: site1.local
==> default: Running provisioner: shell...
default: Running: script: Restarting Nginx
==> default: Running provisioner: shell...
default: Running: script: Creating MySQL Database
==> default: Running provisioner: shell...
default: Running: script: Creating Postgres Database
==> default: Running provisioner: shell...
default: Running: script: Clear Variables
==> default: Running provisioner: shell...
default: Running: inline script
==> default: You are already using composer version 1.2.0 (stable channel).
==> default: Running provisioner: shell...
default: Running: C:/Users/RADLEY~1.ANA/AppData/Local/Temp/vagrant-shell20160801-10000-i2qk4o.sh
更新
我SSH方式登录到虚拟机,我的文件夹结构看起来像的转储:Code/first/index.php
我怎么更新?
我Homestead.yml
文件有不同的目录结构 - 我认为这很可能导致我的问题。我该如何解决?
从我的理解.yml文件决定了虚拟机的文件夹结构?这不是这种情况?
你可以粘贴你的主机文件和“vagrant reload --provision”的输出。你可以制作一个nmap到Vagrant IP“nmap 192.168.10.10”并粘贴输出吗? –
@JesúsAmieiro如何制作一个nmap到Vagrant IP? – Radmation
您必须安装nmap(安装方法取决于您的主机)https://nmap.org/download.html,然后您必须执行“nmap 192.168.10.10”。该命令将显示您的Vagrant VM的开放端口。 –