Configuring Homestead (laravel homestead set-up) - php

i'm trying to install homestead for my laravel, but i failed during
vagrant up command (next step after configuring homestead), error is like missing file (no such file or directory)
i follow this guide https://laravel.com/docs/5.3/homestead to set up the homestead, and i think i messed up here at configuring shared folders
how do i know what to change here (pathway) correctly in Homestead.yaml file
folders:
- map: ~/Code // this one
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public // and this one
my directory for this project is like this
= driveC / xampp / htdocs / myproject

Change:
map: ~/Code to the full path to myproject
And this:
to: /home/vagrant/Code/Laravel/public to the path of one of your laravel project inside the VM

Related

Problem with setting up phpMyAdmin with Homestead and Vagrant

I am trying to install phpMyAdmin with Homestead and Vagrant in Laravel. When I download phpMyAdmin files I ran successful install in git bash, but when I go to http://phpmyadmin.test:8000/ I get error saying 'No input file specified'.
I think that some of my paths are wrong I just can't find which one. Every time I change something I hit vagrant provision command to update everything but it keeps getting the same error. I googled for similar problems, but couldn't find the solution that works for me. Any help is appreciated. Here is my code.
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\laravel-projects
to: /home/vagrant/code
- map: /Users/Gacho/code/phpMyAdmin
to: /home/vagrant/code/phpMyAdmin
sites:
- map: real-estate-laravel.test
to: /home/vagrant/code/real-estate-laravel/public
- map: phpmyadmin.test
to: /home/vagrant/code/phpMyAdmin/
databases:
- real-estate-laravel
hosts
192.168.10.10 real-estate-laravel.test
127.0.0.1 phpmyadmin.test
path to homestead folder
C:\Users\Gacho\Homestead
path to project folder
C:\laravel-projects\real-estate-laravel
You forgot to use the real-estate-laravel subfolder.
folders:
- map: C:\laravel-projects
to: /home/vagrant/code <--- missing subfolder here
- map: /Users/Gacho/code/phpMyAdmin
to: /home/vagrant/code/phpMyAdmin <--- missing subfolder here
Try
folders:
- map: C:\laravel-projects
to: /home/vagrant/code/real-estate-laravel
- map: /Users/Quantox/code/phpMyAdmin
to: /home/vagrant/code/real-estate-laravel/phpMyAdmin

Does laravel/homestead box comes with default website setup?

I am trying to figure out if there is something wrong in my homestead setup
I am following the official direction. In the very end of the direction the tutorial said that accessing http://homestead.app is possible. However when I run the address in my chrome I get the No input file specified. message
I am not sure if this is the default page, so I checked my directory using
homestead ssh
and found out that
- map: /Users/Projects
to: /home/vagrant/Projects
both directory doesn't have any files inside, I am not sure if this is the default behavior, but according to this tutorial there should be a list of file in the folder
app artisan bootsrap composer.json composer.lock ....
I don't remember if homestead comes with a default website, but your homestead.yaml ( you can use homestead edit to open it )file should look like this:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders: //This is where vagrant will look for your projects
- map: ~/Code //This is your host folder
to: /home/vagrant/Code //This is your homestead folder
sites: //These are the urls that nginx will serve
- map: homestead.app
to: /home/vagrant/Code/homestead/public
- map: site2.app
to: /home/vagrant/Code/site2/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
Usually, homestead comes with a Code folder where you can find the laravel project (if there is one by default).
Also, remeber to add the urls to your hosts files.

Adding new site to Homestead.yaml file

I added a Laravel 4.2 installation in my Code folder with the following mapping in my Homestead.yaml file.
I also added the url to this new project in my host file as well. But every time I try vagrant provision the Laravel 5 project (the Laravel folder under "sites") keeps opening up in my browser.
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
- map: laraproject.app
to: /home/vagrant/Code/Project2/public
Any idea what could be causing this? Thanks.
Edit:
No worries, I fixed the problem myself.

No input file specified in URL on Laravel Homestead app

I believe I have everything set up exactly as it should be but consistently receive the following message when attempting to view my app in the browser.
Can anyone tell me where I may be going wrong? I don't have anything set up in Oracle VM Virtualbox manager. Could this be it?
My hosts file has
127.0.0.1 homestead.app
My browser is returning
My project folder is set up as follows:
In my homestead.yaml, I 'think' my paths are correct
SSH into vagrant shows all files in projects/bookings folder
I am not sure, but I don't see bookings folder inside Code folder, my yaml file looks:
folders:
- map: C:\wamp\www\_homestead
to: /home/vagrant/Code
sites:
- map: xilo_black.app
to: /home/vagrant/Code/xilo_black/public
and my local folder structure is
...www_homestead (here are my all files connected to vagrant and homestead and .vagrant folder)
...www_homestead\xilo_black (laravel files)
In code folder, there should be folders with apps
Code\bookings\public
Code\other_app\public
OK, I had to follow instructions on this link to ssh into vagrant machine and create a Laravel project there.
My sites in homestead.yaml then mapped to
sites:
- map: homestead.app
to: /home/vagrant/Code/bookings/public
http://laravel.io/forum/06-04-2014-no-input-file-specified-using-homestead
you need to change the ip in the host file to the same ip you have in the homestead file
192.168.10.10 homestead.app

Laravel homestead/nginx error

I've been using the vagrant box Laravel Homestead and it's all working fine with PHP projects. But now I have a AngularJS project which only has html.
When I map my project in the Homestead.yaml file I get a No input file specified. error.
Did anyone had this error as well? Or has someone a solution for this?
My config is:
folders:
- map: D:/Laravel-Projects/front-end
to: /home/vagrant/Laravel-Projects/front-end
sites:
- map: angular.app
to: /home/vagrant/Laravel-Projects/front-end
you should be mapping the site to the public folder. Also, if all your projects are in the Laravel-Projects folder, just map it 1 level up:
folders:
- map: D:/Laravel-Projects
to: /home/vagrant/Laravel-Projects
sites:
- map: angular.app
to: /home/vagrant/Laravel-Projects/front-end/public
Try vagrant up --provision in your homestead folder after routing the site's entry folder to the root of your site.

Categories