"没有指定输入文件" Laravel Homestead

时间:2017-08-23 18:10:56

标签: laravel homestead

我已经查看了类似问题的现有答案,但这些解决方案似乎都不适合我。

导航至http://fresh.app:8000/会返回no input file specified。我的本地和虚拟环境确实同步(例如,在我的虚拟机中创建文件会在我的本地计算机上创建相应的文件)。

vagrant upvagrant ssh工作,不会产生任何错误。

我的.env文件有APP_URL=fresh.app

我的.homestead/Homestead.yaml文件:

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

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: /Code
      to: /home/vagrant/Code

sites:
    - map: fresh.app
      to: /home/vagrant/Code/fresh/public

databases:
    - homestead
    - fresh

# blackfire:
#     - id: foo
#       token: bar
#       client-id: foo
#       client-token: bar

# ports:
#     - send: 50000
#       to: 5000
#     - send: 7777
#       to: 777
#       protocol: udp

/etc/hosts,在我的本地机器上:

127.0.0.1 fresh.app

在我的虚拟机上,/etc/nginx/sites-available/fresh.app

server {
    listen 80;
    listen 443 ssl http2;
    server_name fresh.app;
    root "/home/vagrant/Code/fresh/public";

    index index.html index.htm index.php;
    ...

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

folders:
    - map: /Code
      to: /home/vagrant/Code

sites:
    - map: fresh.app
     to: /home/vagrant/Code/public

我怀疑您的核心laravel安装在/ Code中,因此上述内容应该可以解决您的问题。除非,您的核心安装位于/ Code / fresh。

另一个可能的原因可能是/ Code路径不正确。您可以通过进入项目目录并获取完整路径来进行验证。如果你在linux中,你可以这样做:

pwd

这将指定它的完整路径,然后您可以更新

folders:
   - map: /the/full/path/to/the/core

在此之后,你运行vagrant reload --provision

让我知道它是否仍无效!

相关问题