【发布时间】:2015-12-14 11:34:08
【问题描述】:
我正在关注启动和运行 laravel 的 larcast 教程,我已经将 laravel 设置为工作正常,现在我希望通过我的 Windows 上的 vagrant 实现它。
但是当我浏览“todo.app:8000”时,我无法运行我的应用程序,这些页面没有响应并显示消息“网页不可用”。
但是,当我第一次设置它时,我可以通过“localhost:8000”访问该页面,并且我在没有“php artisan serve”命令的情况下访问它,但是无法使用“todo.app:8000”之后我更新了作曲家并重新启动了机器,事情变得更糟了,现在我什至无法使用“localhost:8000”访问它>" 而如果我运行 "php artisan serve" 它工作正常。
运行 homestead、vagrant 或 laravel 命令也没有错误,它们工作得很好。
谁能告诉我我做错了什么?
这是我的 homestead.yml 文件
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/code
to: /home/vagrant/code
sites:
- map: todo.app
to: /home/vagrant/code/learning-laravel-5/public
databases:
- homestead
variables:
- key: AAP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
这些是我在 windows 主机文件中所做的配置
# 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
127.0.0.1 todo.app
127.0.0.1 mynew.app
如果还需要其他任何内容,请同时告知。我已经花了一整天的时间来弄清楚,但我被困在这里。提前致谢
【问题讨论】:
标签: php laravel-5 vagrant homestead