duanshang7007 2016-12-09 17:31
浏览 53
已采纳

打开流浪汉服务器 - Laravel 5.3

Yesterday I started to learn Laravel and set up server using Vagrant. Everything was fine. example.dev was working and even managed to make some html/css progress. Then my PC was turned off.

Today I came back home and wanted to re-start where I left but when I entered example.dev it said "Not found!". I went in git bash console, cd to vagrant and did command vagrant up. Machine was booted correctly and started working, but example.dev is still offline.

How to fix this?

I'm using Laravel 5.3 + Vagrant + VBox.

  • 写回答

2条回答 默认 最新

  • dou4381 2016-12-10 18:43
    关注

    If webpage gives you "No input file specified." this means your project directory is not properly mounted to homestead. first check your homestead.yaml file so it is properly formatted and has both:

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

    and also there should be a right settings for your nginx virtual host section

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

    If your directories are different adjust accordingly.

    After this settings checking you need to vagrant up --provision It'll update your vagrant box configuration as you've specified in Homestead.yaml

    this file usually placed in ~/.homestead/Homestead.yaml

    ~ means home directory on windows it is C:\Users\Your_UserName\

    after you'll provision your box make vagrant halt again and vagrant up after this you can check if your development box accessible. To ensure you've set up path mappings correctly you can log in to your box via ssh and check contents of /home/vagrant and subdirectories

    Note: yaml files doesnot allow tab spaces! only usuall spaces edit it in editor like Notepad++ which could show you unprintable characters so you'll not break your yaml file.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算