安装Homestead后,我得到“未指定输入文件".在浏览器中.我如何访问我的laravel项目 [英] After installing Homestead I get "No input file specified" in the browser. How can I access my laravel project
问题描述
我想我终于在笔记本电脑上安装了宅基地!现在,我试图在浏览器中查看我的laravel项目.
I think I finally got homestead installed on my laptop! Now, I am trying to view my laravel project in the browser.
当我在浏览器中打开"dev.app"时,收到一条消息,提示未指定输入文件".我认为这意味着我的家园正在工作,但是laravel项目尚未安装.
When I open "dev.app" in the browser I get a message that say "No input file specified." which I think means that my homestead is working but the laravel project is not there/setup.
我在本地笔记本电脑(即〜/Projects)上创建了一个名为Projects的文件夹.然后从里面执行了该命令
I have created a folder called Projects on my local laptop (i.e. ~/Projects). Then from inside of it i executed this command
laravel新开发者
laravel new dev
但是我仍然在浏览器中收到相同的错误消息,即未指定输入文件".我也尝试打开此链接"dev.app"/dev",但仍然收到相同的消息.
But I still get the same error message in the browser i.e. "No input file specified." I have also tried to open this link "dev.app"/dev" but I still get the same message.
我做错了什么?
这是我的Homestead.yaml文件的内容
Here is the content of my Homestead.yaml file
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Projects
to: /home/vagrant/Code
sites:
- map: dev.app
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
另外,当我依次执行以下2条命令
Additional, when I execute the following 2 commands in order
cd ~/Projects
ls
我看到以下目录dev homestead
I see the following directories dev homestead
当我进入dev.app时该怎么做才能看到我的项目?我需要从Ubuntu VM上执行任何操作,还是应该可以从笔记本电脑直接在〜\ Projects \ dev上编辑文件?
What should I do to see my project when I go to dev.app ? Do I need to do anything from my Ubuntu VM or I should be able to edit the files directly in located on ~\Projects\dev" from my laptop?
推荐答案
-
在本地计算机上的
/etc/hosts
中添加条目
192.168.10.10 dev.app
在Homestead.yaml
sites:
- map: dev.app
to: /home/vagrant/Code/dev/public
这篇关于安装Homestead后,我得到“未指定输入文件".在浏览器中.我如何访问我的laravel项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!