I new with virtual box and vagrant , Now I using Homestead image and every thing is run well
but when i create my project named laravel on virtual machine it supposed that i see this new folder named laravel on my machine but i didn't get any thing on my machine.
when i type url http://homestead.app:8000/ i get This webpage is not available
The synchronization is not working and
NOTE: - I'm using ubuntu 14.04
This is my homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /var/projects/
to: /home/vagrant/projects/
sites:
- map: homestead.app
to: /home/vagrant/projects/laravel/public
variables:
- key: APP_ENV
value: local
thanks advance
...when i create my project named laravel on virtual machine it
supposed that i see this new folder named laravel on my machine...
I've run into this before. The root laravel project folder needs to be created on your real machine first. Then setup the site folder mapping above as you have done.
Then afterwards any further changes inside the virtual machine will replicate/sync both ways.
Related
I'm trying to set up laravel 5.5 working with homestead.
I've followed the steps here up to and including launching the vagrant box.
However, typing "dev.todoparrot.com" or "192.168.10.10" into browser brings up "No input file specified." error.
Trying
vagrant up --provision
(since I made changes to homestead.yaml) did not fix it.
My homestead.yaml looks like:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:/Users/User/.ssh/id_rsa.pub
keys:
- C:/Users/User/.ssh/id_rsa
folders:
- map: D:/projects/todoparrot
to: /home/vagrant/Code
sites:
- map: dev.todoparrot.com
to: /home/vagrant/Code/todoparrot/public
I've installed laravel 5.5 into "D:/projects/todoparrot" with composer. Running php artisan serve on this folder works normally - template site is found at http://127.0.0.1:8000/.
Running
vagrant ssh
or Putty and navigating to /Code and typing ls returns the same files that are in "D:/projects/todoparrot", so the sync is working.
Changing
sites:
- map: dev.todoparrot.com
to: /home/vagrant/Code/todoparrot/public
to
sites:
- map: dev.todoparrot.com
to: /home/vagrant/Code/public
fixed my problem. Following tutorial without thinking about what I'm doing was the root of my mistake.
I am a python developer and my company wanted to do a project in PHP -laravel. Also he wanted me to start with Vagrant. So I came across this simple tutorial and tried to start with it. But still I'm getting error No input file specified.
I have been searching since whole day today for this issue, I have came across many posts which includes same query. I tried almost all the solutions from laravel.io and some stack overflow queries But did not got the exact solution.
Directory Structure:
Git Cloned Homestead - /home/laxmikant/Work/PHPWORK/Homestead
Mapped location - /home/laxmikant/Work/PHPWORK/codebase (totally empty directory)
Folders mapped to : /home/vagrant/codebase (Contains Laravel project)
Here is my Homestead.yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Work/PHPWORK/codebase #-- The path on my local machine
to: /home/vagrant/codebase #-- The path from the vagrant box
sites:
- map: homestead.app
to: /home/vagrant/codebase/Laravel/public #-- The path from the vagrant box which is mapped with folders
databases:
- homestead
variables:
- key: APP_ENV
value: local
Also I am assuming that,By Vagrant ssh when the project is created using :
composer create-project laravel/laravel Laravel --prefer-dist
It should also get synced with codebase directory of vagrant box
So the queries are:
Is this assumption correct? if so why map and to are not getting synced? and
What is the reason that I am getting the error "No input file specified.?
The assumption is correct whatever is in /home/vagrant/codebase will also end up in your ~/Work/PHPWORK/codebase.
After installing laravel via composer if the "no input file" error persists you probably need to reload configuration via running
vagrant provision
You should probably also add a homestead.app entry on your hosts file.
Thanks for your help.
It worked well with the following solutions:
nginx configured manually for my homestead.app
and changed, Sync locations in Vagrantfile
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.
Been trying this for days! I am aware there are other Qs about this, which I have checked over an over. I have one site working and the other not.
I'm using Homestead with Laravel 5 and OSX 10.10.3
I have this .yaml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Sites/LaraCode
to: /home/vagrant/LaraCode
sites:
- map: myapp.app
to: /home/vagrant/LaraCode/myapp/public
- map: newapp.dev
to: /home/vagrant/LaraCode/newapp/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
Both are Laravel 5 apps in these folders:
/Users/USERNAME/Sites/LaraCode/myapp
/Users/USERNAME/Sites/LaraCode/newapp
myapp.app works fine but newapp.dev gives an error:
No input file specified
in the browser.
I have chmod777 the storage folder. There is an index.php in the public folder. I vagrant provision after changes.
Homestead seems to have been a horrible waste of time.
For me homestead destroy and another homestead up worked. Also I guess you added the new url to you hosts file, correct?
Although I agree that the docs for homestead are a little lacking.
Ok,I finally found an answer for this. I believe I had two homesteads set up, so I had to remove a homestead from the VM
I also had to do update my bash_profile so I could use the homestead commands.
Afterwards, in the homestead folder I ran:
homestead provision
To ensure the yaml file was up-to-date.
All is good now. Both sites are running. Server set-ups are always a nightmare for the less computer techie developers. Where I was caught out was the lack of clear folder guidance on where to execute command lines, hence the conflicting homesteads.
Newbie to laravel homestead and vagrant and struggling to get my site to load in the browser. Everything looks as though its running, successfully ran vagrant up.
When i type url http://local.bookings.com:8000/ I receive message "This webpage is not available"
I should point out however that I am on Windows 7 and have nothing visibly running in Oracle VM VirtualBox Manager.
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: c:/Users/me/.ssh/github_rsa.pub
keys:
- c:/Users/me/.ssh/github_rsa
folders:
- map: /Users/me/documents/projects/bookings
to: /home/vagrant/Code
sites:
- map: local.bookings.com
to: /home/vagrant/Code/bookings/public
variables:
- key: APP_ENV
value: local
hosts file
127.0.0.1 local.bookings.com
Edit the host file as
192.168.10.10 local.bookings.com
Hope this will work.
I had this problem, make sure you run homestead up or vagrant up and change the host file to 192.168.10.10 local.bookings.com