Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel宅地和流浪设置不起作用_Laravel_Vagrant_Homestead - Fatal编程技术网

Laravel宅地和流浪设置不起作用

Laravel宅地和流浪设置不起作用,laravel,vagrant,homestead,Laravel,Vagrant,Homestead,我遵循了流浪者和家园的原始文档,但每个网站都有。app:8000你访问它只是不断加载,什么都没有发生。此配置文件中是否存在错误 宅地。yaml ip: "192.168.10.10" memory: 2048 cpus: 1 provider: virtualbox authorize: ~/.ssh/id_rsa.pub keys: - ~/.ssh/id_rsa folders: - map: ~/Developer/laravel to: /home/va

我遵循了流浪者和家园的原始文档,但每个网站都有。app:8000你访问它只是不断加载,什么都没有发生。此配置文件中是否存在错误

宅地。yaml

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: ~/Developer/laravel
      to: /home/vagrant/laravel

sites:
    - map: hello-world.local
      to: /home/vagrant/laravel/hello-world/public

databases:
    - homestead
主机

192.168.10.10    hello-world.local
漂泊日志

Bringing machine 'default' up with 'virtualbox' provider...
==> 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: 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 => /Users/nikla/Developer/homestead
    default: /home/vagrant/laravel => /Users/nikla/Developer/laravel
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
Starting Nmap 7.12 ( https://nmap.org ) at 2016-07-29 22:55 ART
Nmap scan report for 192.168.10.10
Host is up (0.00063s latency).
Not shown: 994 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
3306/tcp open  mysql
5432/tcp open  postgresql
9000/tcp open  cslistener

Nmap done: 1 IP address (1 host up) scanned in 13.19 seconds
nmap日志

Bringing machine 'default' up with 'virtualbox' provider...
==> 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: 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 => /Users/nikla/Developer/homestead
    default: /home/vagrant/laravel => /Users/nikla/Developer/laravel
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.
Starting Nmap 7.12 ( https://nmap.org ) at 2016-07-29 22:55 ART
Nmap scan report for 192.168.10.10
Host is up (0.00063s latency).
Not shown: 994 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
443/tcp  open  https
3306/tcp open  mysql
5432/tcp open  postgresql
9000/tcp open  cslistener

Nmap done: 1 IP address (1 host up) scanned in 13.19 seconds
检查:

  • id_rsa.pub和id_rsa在此文件夹中
  • 主机中存在/Users/nikla/Developer/laravel文件夹
  • /home/vagrant/laravel存在于您的vagrant VM机器中。您可以使用命令“vagrant ssh”在机器中检查它的登录
  • 尝试在不使用8000端口的情况下访问
我在你的homestad.yaml文件中没有看到数据库。你应该在这个文件中有下一个文本

databases:
    - homestead
我已经查过你的“流浪者”日志了,我觉得一切正常。我已经将您的日志与我的机器日志进行了比较,结果是相似的

尝试在web浏览器中打开IP(使用您的虚拟机IP更改IP):

您是否有防火墙、防病毒软件或其他可能禁用通信的软件

尝试执行nmap以查看哪个端口处于打开状态。我将nmap从主机粘贴到虚拟机,这样您就可以看到哪个端口是打开的

$ nmap 192.168.10.10

Starting Nmap 6.47 ( http://nmap.org ) at 2016-07-30 01:48 Hora de verano romance
Nmap scan report for homestead.app (192.168.10.10)
mass_dns: warning: Unable to determine any DNS servers. Reverse DNS is disabled. Try using --system-dns or specify valid servers with --dns-servers
Host is up (0.0019s latency).
Not shown: 993 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
80/tcp   open  http
111/tcp  open  rpcbind
443/tcp  open  https
3306/tcp open  mysql
5432/tcp open  postgresql
9000/tcp open  cslistener
MAC Address: 08:00:27:CD:99:8C (Cadmus Computer Systems)

Nmap done: 1 IP address (1 host up) scanned in 21.83 seconds

您不应该需要
:8000
。考虑到您显示的设置,一旦
vagrant up
,您应该能够将浏览器指向
http://test.app
编辑yaml文件后,您是否运行过“流浪者规定”程序?是的,我运行过。我还重新启动了主机,并使用已经配置的yaml文件启动了vagrant。您还有其他提示吗?当您执行“vagrant up”时,您可以粘贴控制台输出吗?这就是进度,当输入192.168.10.10时,我得到“未指定输入文件”。也许权限有问题?我以前在~/developer/laravel文件夹中使用了chmod-r777。我刚刚用nmap日志更新了帖子。好的,现在你可以访问Vagrant VM机器,但不能访问正确的文件夹。检查/home/vagrant/laravel/hello world/public/文件夹是否存在,以及它是否具有正确的元素(assets.htaccess、index.php、robots.txt、web.config)和权限,然后检查此论坛:现在我在进入IP时获得了laravel 5索引。但是转到.local不起作用,并且主机文件设置正确。有什么想法吗?“192.168.10.10你好,世界。本地”一定有用。现在我想,这可能是nginx虚拟主机的一些问题。您可以粘贴/etc/nginx/sites enabled/content:“ls/etc/nginx/sites enabled/”和域虚拟主机的内容“more/etc/nginx/sites enabled/hello world.local”?我粘贴我的Laravel别名