Adding new site to Homestead.yaml file - php

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.

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

No input file specified. (Laravel with homestead)

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.

Configuring Homestead (laravel homestead set-up)

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

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.

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