Create new native php project in homestead box - laravel

I want to create new project (not a laravel project) in homestead box. I have edited homestead.yaml but when i access on the web browser, it is always routed to the laravel project instead of the map i 've added to homestead.yaml. Here is the conf :
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
mariadb: true
authorize: c:/Users/Fauzan/.ssh/id_rsa.pub
keys:
- c:/Users/Fauzan/.ssh/id_rsa
folders:
- map: d:/Projects/Homestead
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
- map: belajarphp.lol
to: /home/vagrant/Code/Belajarphp/
databases:
- homestead
- belajarphp
I go to 192.168.10.10/belajarphp still directed to the laravel project.
I have added "192.168.10.10 belajarphp.lol" and opened in web browser still directed to laravel project.
I don't have any idea
solved this by destroy vagrant and rebuilt from stractch

Related

Homestead gives error: No input file specified. on Windows 10

I'm running Homestead under Windows 10 using VirtualBox. For some reason, no matter what I try, I get this error:
I only found a single other question similar to my issues, and the resolution there resulted in an error when running vagrant up.
No input file specified.
My homestead.yaml file looked like this:
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
folders:
- map: D:/code
to: /home/code
sites:
- map: homestead.test
to: /home/code/test/public
sites:
- map: info.test
to: /home/code/info/public
sites:
- map: food.test
to: /home/code/food/public
databases:
- homestead
- food
- info
features:
- mysql: true
- mariadb: false
- postgresql: false
- ohmyzsh: false
- webdriver: f
My hosts file is:
192.168.10.10 homestead.test
192.168.10.10 info.test
192.168.10.10 food.test
The folder mappings appear to be working. If I browse D:/code from the host I can see the Laravel
install under D:/code/test. I if put a file there on the host, it's visible from vagrant ssh.
What am I missing?
Try updating your Homestead.yaml file to this:
sites:
- map: homestead.test
to: /home/code/test/public
- map: info.test
to: /home/code/info/public
- map: food.test
to: /home/code/food/public
Maybe specifying "sites" multiple times is what's breaking it.
Have you tried logging in to your box with vagrant ssh and then doing flip to toggle between nginx and Apache?
See https://laravel.com/docs/8.x/homestead#web-servers

No input file selected using Homestead

I'm on Windows and i'm trying to work with Laravel Homestead.
Actually I have the problem of "No input file selected" seems like URL it's not correctly.
My real PATH is this:
C:\Users\Lluis\Projects Where I have my projects
And D:\Homestead_Projects where I want to copy it when make vagrant up.
My homestead.yaml file looks like here:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: c:/Users/Lluis/.ssh/id_rsa.pub
keys:
- c:/Users/Lluis/.ssh/id_rsa
folders:
- map: d:/Homestead_Projects
to: c:/Users/Lluis/Projects
sites:
- map: homestead.app
to: c:/Users/Lluis/Projects/puvik/public
databases:
- homestead
Anyone see the error? Thanks!
Edit Now file looks like here
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Projects
to: /home/vagrant/Projects
sites:
- map: homestead.test
to: /home/vagrant/Projects/puvik/public
databases:
- homestead
Your folder mapping is a little bit off.
Try this:
folders:
- map: c:/Users/Lluis/Projects
to: /home/vagrant/projects
sites:
- map: homestead.test
to: /home/vagrant/projects/puvik/public
Make sure you don't use .app anymore Chrome doesn't like it. use .test
On my case I had to do a vagrant provision to reload the VM
`vagrant provision`

Cannot get Homestead and Laravel working

I am getting 403 Forbidden when going to homestead.app but it works with homestead.app/public
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Desktop
to: /home/vagrant/Desktop
type: "nfs"
sites:
- map: valiant.dev
to: /home/vagrant/Desktop/Laravel
databases:
- homestead
Any help with this would be greatly appreciated, I am about to give up and go back to codeigniter.
Update your homestead.yaml file on .homestead folder to this
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Desktop/Code
to: /home/vagrant/Code
sites:
- map: valiant.app
to: /home/vagrant/Code/public
databases:
- homestead
Mapping folders syncing
folders:
- map: ~/Desktop/Code
to: /home/vagrant/Code
This means that we are going to sync the Desktop/Code folder and /home/vagrant/Code folder so that files are updated on both folders.
Mapping website
sites:
- map: valiant.app
to: /home/vagrant/Code/public
This means whenever you are going to hit valiant.app folder it will check /home/vagrant/Code/public path
Updating Hosts
When you have successfully configured the above one, do vim /etc/hosts and add the following line to the file
192.168.10.10 valiant.dev
Reloading Vagrant
Once you have done all the above mentioned tasks, cd into the Homestead directory on home folder and do the following
vagrant reload --provision
above command will create(if doesn't exist already) on vagrant machine and map them according. Now do
vagrant up
That should get you working.

Homestead.yaml routes causing "No input file specified"

I am having problem with the correct routes for my Homestead.yaml file and is currently displaying the following "No input file specified."
The code is as follows:
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/sites
to: /home/vagrant/web/sites
sites:
- map: test.app
to: /home/vagrant/web/sites/test
databases:
- homestead
How would I correct my problems?
UPDATE
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/web/
to: /home/vagrant/web
sites:
- map: PGM.app
to: /home/vagrant/web/PGM/public
databases:
- homestead
The sites need to have an index file. For example, if you test directory is a Laravel or Lumen application, it has a public directory
sites:
- map: test.app
to: /home/vagrant/web/sites/test/public
Note the addition of public on the end of the path.
Once you've made changes to your Homestead.yml file, you'll need to re-provision the VM using the following to apply the changes.
homestead provision

Varant box shows phpinfo() Only

I use vagrant for my Laravel 5 application.
I only get "phpinfo()" page if i try to access my second domain.
1.homestead.app [Working]
2.lshop.app [show "phpinfo()"]
My homestead.yaml is,
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/laravel/public
- map: l5shop.app
to: /home/vagrant/Code/lshop/public
databases:
- homestead
What is Wrong ?
I get solution:
I just go and change the host file {/etc/hosts}.
Now its working fine.

Resources